Input messages come in two formats, depending on how your application receives them:
Messages that Windows places in the application queue take the form of a MSG structure.
The MSG structure contains fields that identify and contain information about the message. Your application's message loop retrieves this structure from the application queue and dispatches it to the appropriate window function.
Messages that Windows sends directly to a window function take the form of four arguments. The arguments correspond to the window function's hWnd, message, wParam, and lParam parameters.
The only difference between these two message forms is that the MSG structure contains two additional pieces of information: the current location of the cursor (pointer) and the current system time. Windows does not pass this information to the window function.