Vcl.Controls.TControl.WindowProc
Delphi
property WindowProc: TWndMethod read FWindowProc write FWindowProc;
C++
__property System::Classes::TWndMethod WindowProc = {read=FWindowProc, write=FWindowProc};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
event | public | Vcl.Controls.pas Vcl.Controls.hpp |
Vcl.Controls | 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 Examples