怎样将文字以任意角度显示? 请问怎样将文字以任意角度显示? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 void CSampleView:: OnDraw (CDC* pDC) { //Determine the size of the window. CRect rcClient; GetClientRect (rcClient); //Create sample string. CString str (_T ("Wheeee...I am rotating!")); //Draw transparent, red text. pDC->SetBkMode (TRANSPARENT); pDC->SetTextColor (RGB (255,0,0)); CFont font; //font object LOGFONT stFont; //font definition //Set font attributes that will not change. memset (&stFont, 0, sizeof (LOGFONT)); stFont.ifheight=MulDiv (14, -pDC->GetDeviceCaps (LOGPIXELSY), 72); stFont.ifWeight=FW_NORMAL; stFont.ifClipPrecision=LCIP_LH_ANGLES; strcpy (stFont.lfFaceName, "Arial"); //Draw text at 15degree intervals. for (int nAngle=0; nAngle<3600; nAngle+=150) { //Specify new angle. stFont.lfEscapement=nAngle; //Create and select font into dc. font.CreateFontIndirect (&stfont); CFont* pOldFont=pDC->SelectObject (&font); //Draw the text. pDC->SelectObject (pOldFont); font.DelectObjext (); } } HFONT CreateFont(int nHeight, int nWidth, int nEscapement, int nOrientation, int fnWeight, DWORD fdwItalic, DWORD fdwUnderline, DWORD fdwStrikeOut, DWORD fdwCharSet, DWORD fdwOutputPrecision, DWORD fdwClipPrecision, DWORD fdwQuality, DWORD fdwPitchAndFamily, LPCTSTR lpszFace);中nOrientation就是旋转角度。以水平为0度,逆时针 有关TCP通信的问题? I420 转 RGB 用什么 directshow filter a ? 用com实现浏览器功能 请问哪里有VS2005中的VC++视频教程! 十分感谢各位朋友的帮助! 谢谢! 如何在CListCtrl中实现象数据库的表格的样式,单击每个单元格都是可编辑的,列头和行的头都是灰色并可以显示字的? CDialog问题 Socket问题,数据发送完后如何关闭socket 有没有可能改变listbox中的文本颜色 请问为何要对内存进行加锁,解锁操作呢? =====关于CGfxOutBarCtrl类的问题======= 我不明白
{
//Determine the size of the window.
CRect rcClient;
GetClientRect (rcClient);
//Create sample string.
CString str (_T ("Wheeee...I am rotating!"));
//Draw transparent, red text.
pDC->SetBkMode (TRANSPARENT);
pDC->SetTextColor (RGB (255,0,0));
CFont font; //font object
LOGFONT stFont; //font definition
//Set font attributes that will not change.
memset (&stFont, 0, sizeof (LOGFONT));
stFont.ifheight=MulDiv (14, -pDC->GetDeviceCaps (LOGPIXELSY), 72);
stFont.ifWeight=FW_NORMAL;
stFont.ifClipPrecision=LCIP_LH_ANGLES;
strcpy (stFont.lfFaceName, "Arial");
//Draw text at 15degree intervals.
for (int nAngle=0; nAngle<3600; nAngle+=150)
{
//Specify new angle.
stFont.lfEscapement=nAngle;
//Create and select font into dc.
font.CreateFontIndirect (&stfont);
CFont* pOldFont=pDC->SelectObject (&font);
//Draw the text.
pDC->SelectObject (pOldFont);
font.DelectObjext ();
}
}
中nOrientation就是旋转角度。以水平为0度,逆时针