Class TMessageGrabber (unit MessageGrabber) |
TComponent
Constructors |
Functions |
Properties |
Events |
Variables |
Constructors |
Create: Override the WndProc of the owner window. Note that it will be a very bad idea to have several MessageGrabber components active at the same time, unless they are added and removed carefully in order
Functions |
Destroy: Removes the overriding window handler
DefaultHandler: The Dispatch method will attempt to dispatch the method, and failing will call DefaultHandler. If a message-response method calls its inherited method, where the inherited method is undefined, the message is also sent to the DefaultHandler. For a TMessageGrabber, DefaultHandler should pass any unhandled messages back to the owner
WMDestroy: If WM_Destroy is sent to the owner, then when we get around to calling the Destroy method here, Owner will no longer be valid. So, there are two cases: Destroy is called without WMDestroy (ie component is removed at design-time) and WMDestroy is called first (ie owner is about to be destroyed
WndProc: For windowed controls, standard message handling is: the message is sent to WndProc, which calls Dispatch. Only windows controls have a WndProc. But Dispatch is a method of TObject, used for dispatching all message-based methods, not just Windows ones. This WndProc mimics that of a windowed control
Properties |
Events |
Variables |