1.在public下声明:
CFont m_textFont;
2.在构造函数下:
m_textFont.CreateFont(
14, // nHeight
0, // nWidth
0, // nEscapement
0, // nOrientation
FW_BOLD, // nWeight //设置为粗体
FALSE, // bItalic
FALSE, // bUnderline
0,
ANSI_CHARSET, // nCharSet
OUT_DEFAULT_PRECIS, // nOutPrecision
CLIP_DEFAULT_PRECIS, // nClipPrecision
DEFAULT_QUALITY, // nQuality
DEFAULT_PITCH | FF_SWISS, // nPitchAndFamily
"宋体");
在初始化中:
m_combox.SetFont(&m_textFont);
CFont m_textFont;
2.在构造函数下:
m_textFont.CreateFont(
14, // nHeight
0, // nWidth
0, // nEscapement
0, // nOrientation
FW_BOLD, // nWeight //设置为粗体
FALSE, // bItalic
FALSE, // bUnderline
0,
ANSI_CHARSET, // nCharSet
OUT_DEFAULT_PRECIS, // nOutPrecision
CLIP_DEFAULT_PRECIS, // nClipPrecision
DEFAULT_QUALITY, // nQuality
DEFAULT_PITCH | FF_SWISS, // nPitchAndFamily
"宋体");
在初始化中:
m_combox.SetFont(&m_textFont);