RAD Studio VCL Reference
|
Calls message-handling methods for the object, based on the contents of the Message parameter.
procedure Dispatch(var Message); virtual;
virtual Dispatch(var Message);
Call System::TObject::Dispatch to automatically pass messages to the appropriate message handler.
System::TObject::Dispatch determines whether a message is in the list of message handlers declared for the object. If the object does not handle the message, System::TObject::Dispatch then examines the message-handler list of the ancestor class, and continues checking ancestors until it either finds a specific handler or runs out of ancestors, in which case it calls System::TObject::DefaultHandler.
The only assumption System::TObject::Dispatch makes about the data in Message is that the first two bytes contain a message ID—that is, an integer that determines which message handler System::TObject::Dispatch calls. Although any kind of data can be passed to System::TObject::Dispatch, most System::TObject::TObject descendants expect a message record such as TMessage or a specific data structure type.
System::TObject::DefaultHandler
TMessage
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|