关于字体选择

字体选择时要注意,如果前边有@,说明字体旋转90度。

阅读更多

关于字体选择问题?

10-31

rnrn代码:rnrnvoid CFiveView::OnDraw(CDC* pDC)rnrn CFiveDoc* pDoc = GetDocument();rn ASSERT_VALID(pDoc);rn //Determine the size of the window. rnrnCRect rcClient; rnrnGetClientRect (rcClient); rnrn//Create sample string. rnrnCString str (_T ("Wheeee...I am rotating!")); rnrn//Draw transparent, red text. rnrnpDC->SetBkMode (TRANSPARENT); rnrnpDC->SetTextColor (RGB (255,0,0)); rnrnCFont font; //font object rnrnLOGFONT stFont; //font definition rnrn//Set font attributes that will not change. rnrnmemset (&stFont, 0, sizeof (LOGFONT)); rnrnstFont.ifheight=MulDiv (14, -pDC->GetDeviceCaps (LOGPIXELSY), 72); rnrnstFont.ifWeight=FW_NORMAL; rnrnstFont.ifClipPrecision=LCIP_LH_ANGLES; rnrnstrcpy (stFont.lfFaceName, "Arial"); rnrn//Draw text at 15degree intervals. rnrnfor (int nAngle=0; nAngle<3600; nAngle+=150) rnrn rnrn//Specify new angle. rnrnstFont.lfEscapement=nAngle; rnrn//Create and select font into dc. rnrnfont.CreateFontIndirect (&stfont); rnrnCFont* pOldFont=pDC->SelectObject (&font); rnrn//Draw the text. rnrnpDC->SelectObject (pOldFont); rnrnfont.DelectObjext (); rnrn rnrnrn // TODO: add draw code for native data herern rnrnrnrnrnrnrnrnrnrnrn错误:rnrnrnrnrnrnD:\vs\MSDev98\MyProjects\five\fiveView.cpp(87) : error C2039: 'ifheight' : is not a member of 'tagLOGFONTA'rn d:\microsoft visual studio\vc98\include\wingdi.h(1073) : see declaration of 'tagLOGFONTA'rnD:\vs\MSDev98\MyProjects\five\fiveView.cpp(89) : error C2039: 'ifWeight' : is not a member of 'tagLOGFONTA'rn d:\microsoft visual studio\vc98\include\wingdi.h(1073) : see declaration of 'tagLOGFONTA'rnD:\vs\MSDev98\MyProjects\five\fiveView.cpp(91) : error C2039: 'ifClipPrecision' : is not a member of 'tagLOGFONTA'rn d:\microsoft visual studio\vc98\include\wingdi.h(1073) : see declaration of 'tagLOGFONTA'rnD:\vs\MSDev98\MyProjects\five\fiveView.cpp(91) : error C2065: 'LCIP_LH_ANGLES' : undeclared identifierrnD:\vs\MSDev98\MyProjects\five\fiveView.cpp(107) : error C2065: 'stfont' : undeclared identifierrnD:\vs\MSDev98\MyProjects\five\fiveView.cpp(115) : error C2039: 'DelectObjext' : is not a member of 'CFont'rn d:\microsoft visual studio\vc98\mfc\include\afxwin.h(494) : see declaration of 'CFont'rnError executing cl.exe.rnrn我需要加入什么.h文件???

没有更多推荐了,返回首页