博客园 :: :: 博问 :: 闪存 :: 新随笔 :: :: :: 管理 ::
将以下代码加入至 OnInitDialog() 中
// TODO: Add extra initialization here
CFont * m_font= new CFont;
m_font->CreateFont(18,0,0,0,0,0,0,0,GB2312_CHARSET,0,0,0,0,"宋体");

//定义IDC_STATIC的成员变量
CStatic * m_static = (CStatic *)GetDlgItem(IDC_STATIC);
//设置字体,false:不重画窗口
m_static->SetFont(m_font,false);

  



posted on 2016-10-27 13:41  #include<stdio.h>  阅读(234)  评论(0编辑  收藏  举报