.h文件添加
CBCGPMenuBar m_wndMenuBar; //用于设置标题栏字体大小
.cpp文件添加LOGFONT lf; //lf定义字体属性
lf.lfOutPrecision= OUT_STROKE_PRECIS;
lf.lfClipPrecision= CLIP_STROKE_PRECIS;
lf.lfQuality = DRAFT_QUALITY;
lf.lfPitchAndFamily= VARIABLE_PITCH|FF_MODERN;
lf.lfHeight = 12;
lf.lfWidth = 0;
lf.lfEscapement = 0;
lf.lfOrientation = 0;
lf.lfWeight = FW_HEAVY;
lf.lfItalic = FALSE;
lf.lfUnderline = FALSE;
lf.lfStrikeOut = FALSE;
lf.lfCharSet = GB2312_CHARSET;
strcpy(lf.lfFaceName,"宋体");
//UNICODE 工程被替换为 wcscpy wcscpy_s
wcscpy_s(lf.lfFaceName, _T("微软雅黑"));
m_wndMenuBar.SetMenuFont(&lf,TRUE);
设置前
设置后