title: How can I use DrawText() to display a variable?
body: <p>I can draw a string literal via <code>DrawText()</code>:</p>
  
  <pre><code>DrawText (hdcWindow, "abc123", -1, &amp;rc, DT_SINGLELINE);
  </code></pre>
  
  <p>However, this doesn't work with anything else. Specifically, I can't output the value stored in a variable, such as an <code>int</code>:</p>
  
  <pre><code>int variable = 5;
  DrawText (hdcWindow, variable, -1, &amp;rc, DT_SINGLELINE);
  </code></pre>
  
  <p>Or a <code>char</code>:</p>
  
  <pre><code>char variable = a;
  DrawText (hdcWindow, variable, -1, &amp;rc, DT_SINGLELINE);
  </code></pre>
  
  <p>How can I use <code>DrawText()</code> to display the contents of a variable? Why does using a string literal like <code>"abc123"</code> work but substituting it with <code>variable</code> doesn't?</p>