调整静态文本字体和大小

关键字:MFC,字体,大小。

  CFont cfont;                   
     
      cfont.CreateFont(16                                       //字体大小
                                  0,0,0,FW_NORMAL,   
                                  FALSE,FALSE,   
                                  0,   
                                  ANSI_CHARSET,                  // nCharSet
                                 OUT_DEFAULT_PRECIS,     // nOutPrecision
                                 CLIP_DEFAULT_PRECIS,     // nClipPrecision
                                 DEFAULT_QUALITY,             // nQuality
                                 DEFAULT_PITCH | FF_SWISS, "Arial");             // 字体
                                 CWnd*  pWnd = GetDlgItem(IDC_STATIC_TITLE);     // 静态文本的编号
                                 pWnd->SetFont(&cfont);

posted @ 2011-08-02 10:18  BloodAndBone  Views(541)  Comments(0Edit  收藏  举报