Home > Back-end >  Graphics. DrawString how an int variable display?
Graphics. DrawString how an int variable display?

Time:10-20

Beginners custom painting, want to display a list of depth, 10 meters, according to a
for(int i=0; i<8; I++)
{
Int v=10 * I;
Graphics. DrawString ((const WCHAR *) v, 1, & amp; MyFont PointF (Width * 0.14, Height * I * (0.125 + 0.2)), & amp; BrushB);
}
The great god help look at it? How to use GDI + the int data displayed?

CodePudding user response:

Int is converted to a String, use the format function

CodePudding user response:

Oneself solved, use this, not the format of
WCHAR buf [160].
WsprintfW (buf, L "% d", a);
  • Related