From RAD Studio API Documentation
Jump to: navigation, search


function MessageHook(var Msg: TMessage): Boolean; virtual;


virtual bool __fastcall MessageHook(Winapi::Messages::TMessage &Msg);


Type Visibility Source Unit Parent
function protected
Vcl.Dialogs TCommonDialog


Provides special Windows message processing for the dialog.

MessageHook intercepts messages sent to the dialog window before the dialog's window procedure gets them. When MessageHook handles a message, it returns true to indicate that the message should not be sent on for further processing. If the window procedure should handle the message, MessageHook returns false.

Override MessageHook to provide extra message processing. For example, if the Template property substitutes a dialog template with additional controls, use MessageHook to handle messages from those dialog controls.

In TCommonDialog, MessageHook handles Help messages by calling the application's HelpContext method if the HelpContext property is defined. Descendants of TCommonDialog override MessageHook to add additional message processing.

See Also