Message Crackers The message crackers are implemented in WINDOWSX.H. The message crackers are described in WINDOWSX.TXT, which also explains in some detail how to use them. WINDOWSX.TXT does not list all message crackers; the list is available in WINDOWSX.H. The two biggest advantages to using message crackers are: Data type safety, because the message crackers perform a great deal of type casting Simplified porting to 32-bit Windows An application can use message crackers whether or not it defines STRICT. Also, an application can use message crackers to process some messages and traditional code to process others. Using message crackers radically alters the appearance of a window procedure (see the example below). Whether or not this change of appearance is a desirable side effect depends on the coding tastes of the application developer. Typically, a window procedure will handle many messages, with code in the procedure to process each message. This often leads to the source code for a window procedure continuing on for many pages. When an application uses message crackers, almost any window procedure can be listed very concisely. The bulk of the code is transferred to message- handling functions that the message crackers call.
The message crackers are implemented in WINDOWSX.H. The message crackers are described in WINDOWSX.TXT, which also explains in some detail how to use them. WINDOWSX.TXT does not list all message crackers; the list is available in WINDOWSX.H. The two biggest advantages to using message crackers are:
Data type safety, because the message crackers perform a great deal of type casting
Simplified porting to 32-bit Windows
An application can use message crackers whether or not it defines STRICT. Also, an application can use message crackers to process some messages and traditional code to process others. Using message crackers radically alters the appearance of a window procedure (see the example below). Whether or not this change of appearance is a desirable side effect depends on the coding tastes of the application developer. Typically, a window procedure will handle many messages, with code in the procedure to process each message. This often leads to the source code for a window procedure continuing on for many pages. When an application uses message crackers, almost any window procedure can be listed very concisely. The bulk of the code is transferred to message- handling functions that the message crackers call.
向Edit控件中添加内容