请问各位大虾,我在显示字符串时将字符串逆时针旋转90度,但是我不知道如何让字符串在规定的RECT内显示,字符串的左上角和右下角应该是字符串的开头还是结尾,我想让字符串在规定的RECT的下底(BOTTOM)且居中应该如何做呀!谢谢大家了!
LOGFONT lf;
memset (&lf, 0, sizeof (LOGFONT));

lf.lfOrientation = lf.lfEscapement = 900;
lstrcpy ( lf.lfFaceName, _T("Arial") );
lf.lfHeight = 14;
lf.lfWeight = FW_DEMIBOLD;
lf.lfItalic = TRUE;

m_titleFont.CreateFontIndirect ( &lf );
CFont*oldFont = pDC->SelectObject ( &m_titleFont );
pDC->DrawText();//此函数在字符串旋转后如何使用?

解决方案 »

  1.   

    int DrawTextEx(
      HDC hdc,                     // handle to DC
      LPTSTR lpchText,             // text to draw
      int cchText,                 // length of text to draw
      LPRECT lprc,                 // rectangle coordinates
      UINT dwDTFormat,             // formatting options
      LPDRAWTEXTPARAMS lpDTParams  // more formatting options
    );dwDTFormat中可以设置底部居中。
      

  2.   

    同意楼上,dwDTFromat中可以设置底部居中的