Drawing an Integer !!
-
hi to draw a String with GDI+ : graphics.DrawString(L"Hello", -1, &font, PointF(600,100), &solidBrush); how can i change an integer to WCHAR in parameter 1. for exmple i want to draw figures from 1 to 100. thanx
-
hi to draw a String with GDI+ : graphics.DrawString(L"Hello", -1, &font, PointF(600,100), &solidBrush); how can i change an integer to WCHAR in parameter 1. for exmple i want to draw figures from 1 to 100. thanx
-
hi to draw a String with GDI+ : graphics.DrawString(L"Hello", -1, &font, PointF(600,100), &solidBrush); how can i change an integer to WCHAR in parameter 1. for exmple i want to draw figures from 1 to 100. thanx
-
char tmp[4]; for(int i = 1 ; i < 100 ; i++) { sprintf(tmp, "%s", i); graphics.DrawString(tmp, -1, &font, PointF(600,100), &solidBrush); } You can also use eg std::string and boost::lexical_cast, but this is the simplest form I guess HTH
roel_v wrote: sprintf(tmp, "%s", i); You obviously meant:- sprintf(tmp, "%d", i);
-
roel_v wrote: sprintf(tmp, "%s", i); You obviously meant:- sprintf(tmp, "%d", i);