我用如下方法创建字体为"宋体".
CFont nFont;
nFont.CreateFont(m_fontHeight,m_fontWith,0,0,0,FALSE,FALSE,0,0,0,0,0,0,_TEXT("宋体"));//创建字体问:这样的话在其他国家如日本,韩国,中东等国家的语言的系统下显示他们国家的文字,会有问题吗? 会不会因为他们国家没有"宋体"而乱码?
CFont nFont;
nFont.CreateFont(m_fontHeight,m_fontWith,0,0,0,FALSE,FALSE,0,0,0,0,0,0,_TEXT("宋体"));//创建字体问:这样的话在其他国家如日本,韩国,中东等国家的语言的系统下显示他们国家的文字,会有问题吗? 会不会因为他们国家没有"宋体"而乱码?
//应该不会,如果系统字库中没有宋体,会找最接近的字体代替。lpszFacename
A CString or pointer to a null-terminated string that specifies the typeface name of the font. The length of this string must not exceed 30 characters. The Windows EnumFontFamilies function can be used to enumerate all currently available fonts. If lpszFacename is NULL, the GDI uses a device-independent typeface.