Vcl.Controls.TWinControl.DefWndProc

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property DefWndProc: Pointer read FDefWndProc write FDefWndProc;

C++

__property void * DefWndProc = {read=FDefWndProc, write=FDefWndProc};

Properties

Type Visibility Source Unit Parent
property protected
Vcl.Controls.pas
Vcl.Controls.hpp
Vcl.Controls TWinControl

Description

Specifies the default window procedure for the windowed control.

Windowed controls use the Windows API function CallWindowProc with DefWndProc to invoke the standard Windows message handling for a window message. Using DefWndProc instead of the WndProc method bypasses any message processing introduced by the WndProc method.

DefWndProc fills the role for windowed controls that DefaultHandler fills for all objects. The DefaultHandler for TWinControl uses DefWndProc to pass messages to Windows for processing.

For windowed controls, DefWndProc is initially set to the window procedure of the window class specified in the Params parameter in the CreateParams method. Change DefWndProc to subclass the window class of a windowed control.

See Also