how to convert integer to lpctstr thanks!
how to convert integer to lpctstr thanks!
Last edited by mr_empty; 11-16-2007 at 08:56 PM.
How do you mean? Perhaps strtol or a stringstream would be the right solution, but it's hard to tell with so little information.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
this command:
editmessage.SetWindowText(resultCount);
editmessage is the edit box variable, resultCount is the integer
but it shows error message that resultCount can't be converted to LPCTSTR
itoa()
sprintf()
std::stringstream
There's plenty of ways to convert an int to a char* string.
Use a stringstream, then use its str() method to get a string, then use its c_str() method to get a const char* which is what LPCTSTR is (assuming you're not using unicode).