[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Controls' (#lcl)

# TWinControl.WndProc

Adds special handling for focus and input messages, and notifies the DockManager.

## Declaration

Source position: controls.pp line 2314

`protected procedure TWinControl.WndProc(`
`var Message: TLMessage`
`); override;`

## Arguments

`Message` |  | Message examined and handled in the method.

## Description

Handles the following messages:

LM_SETFOCUS
  Gets the parent form and show this control as focused
LM_KILLFOCUS
  Removes focus from this control
LM_NCHITTEST
  Checks the transparency for the control, etc.
Mouse messages
  Sent to the DockManager (when used).
CM_THEMECHANGED
  Broadcasts the message received for a theme change event.

## Version info

Modified in LCL version 3.6 to handle CM_THEMECHANGED messages.

## See also

TControl.WndProc |  | The general message handler for this control.