Controls.TControl.WindowProc

From RAD Studio VCL Reference
Jump to: navigation, search

Contents

Delphi Information

From Controls.pas

	property WindowProc: TWndMethod read FWindowProc write FWindowProc;


Unit: Controls

Type: event

Visibility: public

Member Of: TControl

C++ Information

From Controls.hpp

	__property TWndMethod WindowProc;


Unit: Controls

Type: property

Visibility: public

Member Of: TControl

Description

Points to the window procedure that responds to messages sent to the control.


Use the WindowProc property to temporarily replace or subclass the window procedure of the control. Component writers that are customizing the window procedure for a descendent class should override the WndProc method instead.

Before assigning a new value to WindowProc, store the original value. WindowProc is initially set to the WndProc method, so if the value has not been changed since then, the original value need not be stored. Within the procedure that is used as the new value for WindowProc, pass any unhandled messages to the original procedure that was the value of WindowProc. After completing any specialized message handling, restore the value of WindowProc to the original procedure.

See Also

Code Samples


Personal tools
Translations
Newest Version