This function is specified when an application registers its window class and can be named anything (not necessarily WindowProc).
wParam and lParam are parameters whose meaning depends on the message.
An application should identify the message and take the required action.
Hundreds of different messages are produced as a result of various events taking place in the system, and typically, an application processes only a small fraction of these messages.
An application usually calls DefWindowProc at the end of its own WindowProc function, so that unprocessed messages can be passed down to the default procedure.