I can now create win32 GUI applications in C++. However, even though I can write the code, there are somethings that I'm not exactly clear on.
In the LRESULT CALLBACK WndProc(...), what is HWND? Also, what is WPARAM and LPARAM? Hopefully someone like Xception can help. :)
It's a callback procedure/function. That means Windows calls it everytime a certain event happens and passes these parameters to the function:
HWND is the handle to the window of the callback function, the same you get with CreateWindow(EX)
UINT message is the message identifier, the message which called the callback function is stored there, for example WM_PAINT
WPARAM and LPARAM are message parameters, the values stored there depend on the message:for example WM_KEYDOWN - WPARAM=Virtual keycode,LPARAM=extended keycode
Alright. Thanks Xception.