例如
HWND hwnd;
hwnd = CreateWindow(szWincls,"示例程序",WS_OVERLAPPEDWINDOW,
100,100,1100,600,NULL,NULL,hInstance,NULL);
在VS2008中将出错:cannot convert parameter 2 from 'char *' to 'LPCWSTR'
解决方法可如下:
wchar_t *szWincls = L"paint";
wchar_t *szTitle = L"示例程序";
HWND hwnd;
hwnd = CreateWindow(szWincls,szTitleWS_OVERLAPPEDWINDOW,
100,100,1100,600,NULL,NULL,hInstance,NULL);