[Win32 API] GetWindowText () Function

Is there any way to use something besides TCHAR in this code:

1
2
3
TCHAR tcInput [256];
GetWindowText (GetDlgItem (hWnd, TEXT_INPUT), tcInput, 256);
MessageBox (hWnd, tcInput, "Test message", NULL);


Such as a std::string or a char* ? If so can someone please tell me how, a few examples would be great!

Thanks !
wow, no one? :(
What is the issue here??
These are pretty much the choices:

char
wchar_t
TCHAR

After the character array is copied to a buffer typed according to one of these, you could then assign it to a std::string (or wstring) for further minipulation.
ok thanks I will try later and will let you guys know how it went.
If you don't want to use TCHAR then you can just use the A/W versions of each function and then use char (A) and wchar_t (W) accordingly.
Topic archived. No new replies allowed.