设置字体

来源:互联网 发布:三生万物 知乎 编辑:程序博客网 时间:2024/05/01 07:03
LOGFONT lf;CFont *ptf=GetDlgItem(IDC_STATIC_TITLE)->GetFont();ptf->GetLogFont (&lf);     lf.lfHeight=(int)(36*m_Multiple_heith);//改变字体高度 lf.lfWidth=(int)(lf.lfWidth*m_Multiple_width);lf.lfWeight=900;    strcpy (lf.lfFaceName,"Anklepants");//改变字体名称     editfont.CreateFontIndirect (&lf); //创建一种逻辑字体,任何设备环境均可使用GetDlgItem(IDC_STATIC_TITLE)->SetFont (&editfont);