参考文档

http://msdn.microsoft.com/en-us/library/ms533909

http://louis.steelbytes.com/DrawTextBug.html

http://msdn.microsoft.com/en-us/library/dd162498 

 

 OnPaint()函数里

 CPaintDC dc(this); 

WCHAR  *szBuffer; 

CString m_strCaption= _T("test");

szBuffer=new WCHAR[m_strCaption.GetLength()+10]; 

wcscpy(szBuffer,m_strCaption); 

 CRect rectTest;
 dc.DrawText(szBuffer,-1,&rectTest,DT_CALCRECT); 

相关文章:

  • 2021-11-12
  • 2021-09-29
  • 2021-05-27
  • 2022-01-19
  • 2021-11-12
  • 2022-12-23
  • 2021-11-30
  • 2021-08-23
猜你喜欢
  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
  • 2021-12-13
  • 2022-12-23
相关资源
相似解决方案