代码如下,加到对话框的OnInitDialog()成员函数,
CButton* pButton = (CButton*)GetDlgItem(IDOK);LOGFONT lf;ZeroMemory(&lf, sizeof(LOGFONT));lf.lfHeight = 25; // 字体高度lf.lfWidth = 0; // 字体平均宽度lf.lfEscapement = 0; // 字体角度lf.lfOrientation = 0; // 字体角度lf.lfWeight = FW_NORMAL; // 字体粗细lf.lfItalic = FALSE; // 是否斜体lf.lfUnderline = FALSE; // 是否下划线lf.lfStrikeOut = FALSE; // 是否删除线lf.lfCharSet = DEFAULT_CHARSET; // 字符集lf.lfOutPrecision = OUT_TT_PRECIS; // 输出精度lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; // 剪切精度lf.lfQuality = PROOF_QUALITY; // 输出质量lstrcpy(lf.lfFaceNam