The Message Handler
We don't need to worry too much about the parameters of the function because the Windows system calls this function automaticlly. You just need to have those four parameters declared. We determine the type of message and how to handle it by using a switch statement. This simple program just uses WM_DESTROY, which is a message that is sent to the program when it's beilg closed. We handle the message by telling the program to quit and return 0 to let Windows know we processed the message. All messages that aren't processed by us are returned to Windows to use the default processing by calling DefWindowProc. |
||||||||||||||||||||