// 设置字体参数
LOGFONT LogFont={0};
::memset(&LogFont, 0, sizeof(LOGFONT));
lstrcpy(LogFont.lfFaceName, "新宋体");
LogFont.lfWeight = 400;
LogFont.lfHeight = 44; // 字体大小
LogFont.lfCharSet = 134;
LogFont.lfOutPrecision = 3;
LogFont.lfClipPrecision = 2;
LogFont.lfOrientation = 45;
LogFont.lfQuality = 1;
LogFont.lfPitchAndFamily = 2;
// 创建字体
HFONT hFont = CreateFontIndirect(&LogFont);
// 取得控件句柄
HWND hWndStatic = GetDlgItem(hDlg, IDC_STATIC_INFO);
// 设置控件字体
PostMessage(hWndStatic, WM_SETFONT, (WPARAM)hFont, 0);