LOGFONT lf;
memset(&lf, 0, sizeof(LOGFONT)); // Zero out the structure.
lf.lfHeight = 18; // Request a 12-pixel-height font.
lf.lfCharSet = DEFAULT_CHARSET; //CHINESEBIG5_CHARSET;
lstrcpy(lf.lfFaceName, _T("simsun")); // Request a face name "Arial".
BOOL bFlag = g_font.CreateFontIndirect(&lf); // Create the font. font为全局变量
CodePage
[in] The code page to be used to perform the conversion. This parameter can be given the value of any code page that is installed or available in the system.
You can also specify one of the values shown in the following table.
Value Description
CP_ACP ANSI code page
CP_MACCP Not supported
CP_OEMCP OEM code page
CP_SYMBOL Not supported
CP_THREAD_ACP Not supported
CP_UTF7 UTF-7 code page
CP_UTF8 UTF-8 code page