I read this line in creating window example with win32 API:


please, can someone explain it to me..!
i googled but i can't find enough explanation

Here is an article explaining CALLBACK functions (good article I actually learned a lot)

Chapter #3 in Petzold's, "Programming Windows 5th Edition" explains a lot about windows creation and message handling. According to Petzold (p. 62):

A window's procedure is always defined like this:

LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)

The four parameters to the window procedure are identical to the first four fields of the MSG structure. The first parameter is hwnd, the handle to the window receiving the message.....

The second parameter is the same as the same as the message field in the MSG structure. It's a number that identifies the message....

Suprisingly, Petzold doesn't go into detail about the WPARAM and LPARAM arguments, but begins to give example code of how to process these as windows messages.

Here is what the MSG struct looks like:

typedef struct {
    HWND hwnd;
    UINT message;
    WPARAM wParam;
    LPARAM lParam;
    DWORD time;
    POINT pt;