Vcl.Controls.TWinControl.WndProc

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure WndProc(var Message: TMessage); override;

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 TWinControl

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 point to the WndProc method.

WndProc for TWinControl overrides the inherited method to define responses for focus, mouse, and keyboard messages. It sends all others to its inherited WndProc.

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

See Also

Code Examples