Friday, October 10, 2008

Convert normal string to LPCWSTR - Visual C++

Whenever you need to convert a normal string into a LPCWSTR (most likely to pass it into an Windows API function), use the _T function.

Check out this madness...

MessageBox(_T("test"), _T("test"));

No comments: