I am trying to write some vertical text using MFC GDI and somehow the written image clips out when I try to rotate it through an angle (say 30 degrees). Could anyone suggest me as to what might be the problem. The CreateFont definitions and the text to be written is given below:
m_SmallFontVert.CreateFont(14,0,300,300,FW_BOLD, FALSE, FALSE, 0, ANSI_CHARSET,
OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
DEFAULT_QUALITY, DEFAULT_PITCH | FF_ROMAN,
"Arial");
And my Text:
CRect HeightRect(450,850,800,1000);
HeightRect.MoveToXY(450,500);
CString HeightText = "HEIGHT";
pDC->DrawText(HeightText,HeightRect,DT_LEFT);
It gives the output:

Any suggestions on where I might be wrong?
While using your DrawText Function, make sure you specify DT_NOCLIP as your format parameter as well so that it doesn’t clip your output.
Reference: MSDN
Something like this:
Hope this helps!