再很多dockable的属性页中标题的字体是旋转的,请问这个是怎么实现的?谢谢

解决方案 »

  1.   

    使用CreateFont
    HFONT CreateFont(
      int nHeight,
      int nWidth,
      int nEscapement,  // 这个就是旋转角度,要乘10, 300表示30度
      int nOrientation,
      int fnWeight,
      DWORD fdwItalic, 
      DWORD fdwUnderline,
      DWORD fdwStrikeOut,
      DWORD fdwCharSet,
      DWORD fdwOutputPrecision,
      DWORD fdwClipPrecision,
      DWORD fdwQuality,
      DWORD fdwPitchAndFamily,
      LPCTSTR lpszFace 
    );
      

  2.   

    LOGFONT lfFont;
    lfFont.lfWidth = 8;
    lfFont.lfHeight = 16;
    lfFont.lfEscapement = 300;// 这个就是旋转角度,要乘10, 300表示30度
    lfFont..lfCharSet = GB2312_CHARSET;
    strcpy(lfFont.lfFaceName, "宋体");CFont NewFont;
    NewFont.CreateFontIndirect(&lfFont);CFont *OldFont = pDC->SelectObject(&NewFont);
    pDC->TextOut();
    pDC->SelectObject(OldFont);
      

  3.   

    刚才忘记了在使用lfFont前要加
    memset(&lfFont, 0, sizeof(LOGFONT));