Vcl.Controls.TWinControl.MainWndProc
Delphi
procedure MainWndProc(var Message: TMessage);
C++
void __fastcall MainWndProc(Winapi::Messages::TMessage &Message);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
protected | Vcl.Controls.pas Vcl.Controls.hpp |
Vcl.Controls | TWinControl |
Description
Receives Windows messages for the control.
MainWndProc is the window procedure for the control that is associated with the control's window when it is created. When Windows sends a message to the control's window, MainWndProc receives it.
MainWndProc does not process or dispatch the messages itself, but rather calls the method specified by WindowProc to do that. MainWndProc provides an exception-handling block around WindowProc, ensuring that if any unhandled exceptions occur during the processing of a message, the application's HandleException method will handle them.