I'm trying to create a (very) simple Win32 GUI program, but for some reason the compiler (I'm using VC++ 2008 Express) wants me to manually typecast every string or char* to LPCWSTR:
I get this compiler error every time I do this, for example I get this error for the "Hello" and "Note":
error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [22]' to 'LPCWSTR'
Please tell me I don't have to cast every time I do this....
Here's the code:
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
MessageBox(NULL, "Hello", "Note", MB_OK);
return 0;
}