Hello I'm Pachelbel, first of all i wanna say that iam a Newb but i wont be crying like many other people that i saw in this posts. I started learning C++, and i wanted to go for Win32 Api.... now there is a problem and i need your help... i was writting this basic Win32 code and when i try to compile it i get this error: ('WindowProcedure' was not declared in this scope) --- line 11. Here is the code:
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpszCmdParam, int nCmdShow)
{
HWND hWnd;
MSG Message;
WNDCLASS WndClass;
WndClass.style = CS_HREDRAW | CS_VREDRAW;
WndClass.lpfnWndProc = WindowProcedure;
WndClass.cbClsExtra = 0;
WndClass.cbWndExtra = 0;
WndClass.hbrBackground = (HBRUSH) GetStockObject(LTGRAY_BRUSH);
WndClass.hCursor = LoadCursor(NULL, IDC_ARROW);
WndClass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
WndClass.hInstance = hInstance;
WndClass.lpszClassName = "NUESTRA_CLASE";
WndClass.lpszMenuName = NULL;
RegisterClass(&WndClass);
hWnd = CreateWindow(
"NUESTRA_CLASE",
"Ventana de Ejemplo",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,
CW_USEDEFAULT,
320,
200,
HWND_DESKTOP,
NULL,
hInstance,
NULL
);
ShowWindow(hWnd, SW_SHOWDEFAULT);
while(TRUE == GetMessage(&Message, 0, 0, 0))
{
TranslateMessage(&Message);
DispatchMessage(&Message);
}
return Message.wParam;
}
What should i correct
. Anyways thanks and sorry for my english, it isnt my mother tonge
. Win32 API's Tutorials would be really helpfull!