我是按照书上的打的。孙鑫的vc++教程。
为什么还是有很多这类的提示呢?
求助。
谢谢各位了
CreateWindow提示的const char* 类型的参数与LPCWSTR类型的形参不兼容
switch (uMsg)
{
case WM_CHAR:
char szChar[20];
sprintf(szChar, "char code is %d", wParam);
MessageBox(hwnd, szChar, "char", 0);
break;
case WM_LBUTTONDOWN:
MessageBox(hwnd, "mouse clicked", "message", 0);
其中:
MessageBox(hwnd, szChar, "char", 0);
MessageBox(hwnd, "mouse clicked", "message", 0);
szChar,"char" "mouse clicked" 全部都是:cannot convert lvalue of type char[20] to parameter type "wchar_t const*"