How use the function of SetCurrentConsoleFontEx ?

typedef struct _CONSOLE_FONT_INFOEX {
ULONG cbSize;
DWORD nFont;
COORD dwFontSize;
UINT FontFamily;
UINT FontWeight;
WCHAR FaceName[LF_FACESIZE];
} CONSOLE_FONT_INFOEX, *PCONSOLE_FONT_INFOEX;

please tell me how to set this struct's member nFont?

nFont---The index of the font in the system's console font table.



void main()
{
HANDLE StdOut;
COORD dwFontSize;
CONSOLE_FONT_INFOEX FontInfoEx;

dwFontSize.X=20;
dwFontSize.Y=30;
FontInfoEx.cbSize=sizeof(CONSOLE_FONT_INFOEX);
FontInfoEx.dwFontSize=dwFontSize;
FontInfoEx.FontFamily=TMPF_DEVICE;
wcscpy_s(FontInfoEx.FaceName,L"Arial");
FontInfoEx.FontWeight=200;
FontInfoEx.nFont=........;
StdOut=GetStdHandle(STD_OUTPUT_HANDLE);

SetCurrentConsoleFontEx(StdOut,FALSE,
}
I am a beginner.
Topic archived. No new replies allowed.