Strange...
Could you post a screenshot?
Are you sure all variables have correct values?
I just tried your code and got the result as you see in the screenshot below.
Code:dc.SetBkMode(TRANSPARENT); CFont Font; Font.CreateFont(24, // nHeight 0, // nWidth 900, // nEscapement 900, // nOrientation FW_NORMAL, // nWeight FALSE, // bItalic FALSE, // bUnderline 0, // cStrikeOut ANSI_CHARSET, // nCharSet OUT_DEFAULT_PRECIS, // nOutPrecision CLIP_DEFAULT_PRECIS, // nClipPrecision DEFAULT_QUALITY, // nQuality DEFAULT_PITCH | FF_SWISS, // nPitchAndFamily "Arial"); CFont *OldFont = dc.SelectObject(&Font); dc.TextOut(100,100, "Test text"); dc.SelectObject(OldFont); Font.DeleteObject ();




Reply With Quote