HWND wndHandle; //global variable
// code snipped
WNDCLASSEX wcex;
// code snipped
wcex.lpszClassName = (LPCWSTR) "MyTitleName";
// code snipped
wndHandle = CreateWindow(
(LPCWSTR)"MyTitleName", //the window class to use
(LPCWSTR)"MyTitleName", //the title bar text
...
...
I am following a tutorial for Win32 Window application. The code above is used to set the name of the title bar of the window screen. The compiler yells at me : "cannot convert from 'const char [12]' to 'LPCWSTR'" so okay, I typecasted my string "MyTitleName" with (LPCWSTR), and everything compiled just fine. However, during runtime, the title of the window screen turns out to be Chinese characters. I tried change the string around and the Chinese characters always change according to my string somehow. I am using XP Visual C++ 2008 Express Edition and I got English (United States) as a setting for non-unicode programs. I don't get it. How come the string become Chinese?