Show: Delphi C++
Display Preferences

Vcl.Controls.TWinControl.DefaultHandler

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure DefaultHandler(var Message); override;

C++

virtual void __fastcall DefaultHandler(void *Message);

Properties

Type Visibility Source Unit Parent
procedure
function
public
Vcl.Controls.pas
Vcl.Controls.hpp
Vcl.Controls TWinControl

Description

Provides message handling for all messages that the control does not fully process by itself.

Override DefaultHandler to change the default message handling for the control. The Message parameter can be cast to a TMessage type, to obtain the WParam, LParam, and Result of the message. If the Result of the message is non-zero, the message has already been handled. Set the Result field to a non-zero value to prevent further processing of the message by the inherited method.

Note: In Delphi code, calling inherited in a message-handling method results in a call to the ancestor's DefaultHandler method unless that ancestor specifies an explicit handler for the message.

TWinControl overrides the TControl DefaultHandler method to handle messages for all its descendant types. DefaultHandler passes any otherwise-unhandled messages to the control's window procedure using the CallWindowProc API function.

See Also

Personal tools
In Other Languages
Previous Versions
Assistance