CFont font;怎么设置字体为粗体?

解决方案 »

  1.   

    BOOL CFont::CreateFont(
       int nHeight,
       int nWidth,
       int nEscapement,
       int nOrientation,
       int nWeight,
       BYTE bItalic,
       BYTE bUnderline,
       BYTE cStrikeOut,
       BYTE nCharSet,
       BYTE nOutPrecision,
       BYTE nClipPrecision,
       BYTE nQuality,
       BYTE nPitchAndFamily,
       LPCTSTR lpszFacename 
    );
      

  2.   

    同意楼上的,将nWeight设置为FW_BOLD即可
      

  3.   

     nWeight    Specifies the font weight (in inked pixels per 1000). See the lfWeight member in the LOGFONT structure in the Platform SDK for more information. The described values are approximate; the actual appearance depends on the typeface. Some fonts have only FW_NORMAL, FW_REGULAR, and FW_BOLD weights. If FW_DONTCARE is specified, a default weight is used.
    设置成 FW_BOLD