title: Draw vertical text using MFC
body: <p>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:</p>
  
  <pre><code>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");
  </code></pre>
  
  <p>And my Text:</p>
  
  <pre><code>CRect HeightRect(450,850,800,1000);
      HeightRect.MoveToXY(450,500);
      CString HeightText = "HEIGHT";
      pDC-&gt;DrawText(HeightText,HeightRect,DT_LEFT);
  </code></pre>
  
  <p>It gives the output:</p>
  
  <p><img src="https://i.stack.imgur.com/LyXGu.jpg" alt="enter image description here"></p>
  
  <p>Any suggestions on where I might be wrong?</p>