Handling Messages
Handling or processing a message means that your application responds in some manner to a Windows message. In a standard Windows application, message handling is performed in each window procedure. By internalizing the window procedure, however, Delphi makes it much easier to handle individual messages; instead of having one procedure that handles all messages, each message has its own procedure. Three requirements must be met for a procedure to be a message-handling procedure:
- The procedure must be a method of an object.
- The procedure must take one var parameter of a TMessage or other message-specific record type.
- The procedure must use the message directive followed by the constant value of the message you want to process. ...
Get Borland® Delphi™ 6 Developer's Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.