During execution, a window processes messages passed to it by Presentation Manager, using the methods defined in its window procedure. Upon receiving a message, the window procedure performs three basic tasks:
As part of the second step above, the window procedure may extract necessary information from the parameters passed with the message, using a number of macros provided by Presentation Manager. These macros are described in Creating Message Parameters.
The window procedure may also gain access to instance data or resource handles stored in a control block during processing of previous messages. This control block is generally allocated upon creation of the window and a pointer to it stored in the window words. The window procedure may retrieve this pointer from the window words at the start of processing for the current message. See Instance Data and Window Words.