Vcl.Controls.TControl.WndProc

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure WndProc(var Message: TMessage); virtual;

C++

virtual void __fastcall WndProc(Winapi::Messages::TMessage &Message);

Properties

Type Visibility Source Unit Parent
procedure
function
protected
Vcl.Controls.pas
Vcl.Controls.hpp
Vcl.Controls TControl

Description

Provides specific message responses for the control.

Override WndProc to change the initial Windows message handler for the control. The WindowProc property is initialized to WndProc.

WndProc implements the mouse behavior specified by the ControlStyle and DragMode properties, and updates the ControlState property. It passes any unhandled messages on to the Dispatch method.

When overriding WndProc to provide specialized responses to messages, be sure to call the inherited WndProc at the end to dispatch any unhandled messages.

See Also

Code Examples