I only have one error in my code and I dont know why it is wrong!
(I have not run the code, but the part that is underlined in red sais:
A value of type "long" cannot be used to initialize an entitity of type "HWND")
All i am trying to do is create a window.
Here is the part with the error. Its where I create a window.
Code:
HWND WINAPI CreateWindowEx(
WS_EX_CLIENTEDGE,
g_szClassName,
"The title of my window",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT, 240, 120,
NULL, NULL, hInstance, NULL);
if(hwnd == NULL)
{
MessageBox(NULL, "Window Creation Failed!", "Error!",
MB_ICONEXCLAMATION | MB_OK);
return 0;
}
ShowWindow(hwnd, nCmdShow);
UpdateWindow(hwnd);
How do I fix this?