VCL Control Messages (values): parameters: comments:
CM_BASE
($B000)
CM_ACTIVATE no params used when app is actived or a
(CM_BASE + 0) custom form is modally shown
CM_DEACTIVATE no params counter part to CM_ACTIVATE
(CM_BASE + 1)
CM_GOTFOCUS no params not used
(CM_BASE + 2)
CM_LOSTFOCUS no params not used
(CM_BASE + 3)
CM_CANCELMODE TCMCancelMode used to stop special behaviour of
(CM_BASE + 4) controls like TDBLookup
CM_DIALOGKEY TCMDialogKey used in the KeyPreview chain of a
(CM_BASE + 5) form to determin whether a child
control processes special keys like
TAB, arrow keys etc.
CM_DIALOGCHAR TCMDialogChar same as CM_DIALOGKEY but for
(CM_BASE + 6) characters
CM_FOCUSCHANGED TCMFocusChanged used in forms when the active
(CM_BASE + 7) control changes
CM_PARENTFONTCHANGED if wParam = 1 then lParam
(CM_BASE + 8) contains a TFont else just
use the font of the parent
used in all controls
CM_PARENTCOLORCHANGED if wParam = 1 then
(CM_BASE + 9) lParam contains a color
else just use the color of
the parent used in all
controls
CM_HITTEST TCMHitTest used only at design time (and only
(CM_BASE + 10) in ControlAtPos) to determine the
control at the current mouse
Message.Result = 0 if control
considers itself as not hit else 1
CM_VISIBLECHANGED wParam = 1 if visible, used when a control's visibility is
(CM_BASE + 11) lParam contains changed by its Visible property
CM_ENABLEDCHANGED no params used when a control is enabled or
(CM_BASE + 12) disabled by its Enabled property
CM_COLORCHANGED no params used when a control's color is
(CM_BASE + 13) changed by its Color property
CM_FONTCHANGED no params used in the TFont.OnChange
(CM_BASE + 14) event of a control's font
CM_CURSORCHANGED no params used when a control's cursor is
(CM_BASE + 15) changed by its Cursor property
CM_CTL3DCHANGED no params used when control's Ctrl3D
(CM_BASE + 16) property is changed
CM_PARENTCTL3DCHANGED no params used with ActiveX control
(CM_BASE + 17) (OnAmbientPropertyChange), in
response to a
CM_CTRL3DCHANGED message
and used when reading a
TWinControl from a stream
CM_TEXTCHANGED no params used when a control's text is
(CM_BASE + 18) changed
CM_MOUSEENTER wParam = 0,
(CM_BASE + 19) lParam = sometimes
a reference of the control
having the mouse pointer
over it sent by TApplication
and used internally by
TSpeedButton
CM_MOUSELEAVE as in counterpart to
(CM_BASE + 20) CM_MOUSEENTER CM_MOUSEENTER
CM_MENUCHANGED no params internal message for TMenu
(CM_BASE + 21) (when merging or an item has
changed)
CM_APPKEYDOWN wParam = KeyCode, sent only when determining
(CM_BASE + 22) lParam = KeyData (like in whether a key is a menu key
WM_KEYDOWN)
CM_APPSYSCOMMAND wParam = 0, sent in response to a
(CM_BASE + 23) lParam = @Message WM_SYSCOMMAND message (received by a TWinControl)
passing the entire Message record
in lParam (used in hint windows
and by the application to focus
itself)
CM_BUTTONPRESSED wParam = group index, used internally by TSpeedButton
(CM_BASE + 24) lParam = button reference to implement button groups
CM_SHOWINGCHANGED no params sent by TWinControl on various
(CM_BASE + 25) events (window creation, loading
from stream, new parent
assignment), used in TCoolBand
on destroy and by TMemoStrings
on UpdateState change
CM_ENTER TCMEnter sent by TForm when the focus
(CM_BASE + 26) changes to another child control
and by TApplication when it gets
the focus
CM_EXIT TCMExit sent by TForm when the focus
(CM_BASE + 27) changes to another child
CM_DESIGNHITTEST TCMDesignHittest special message never sent from
(CM_BASE + 28) within the VCL (but from a
designer DLL), used only at
design time to determine whether
a control wants mouse and key
input. Message.Result = 1 if the
control behaves like at runtime
else 0
CM_ICONCHANGED no params sent by TApplication from its
(CM_BASE + 29) FIcon.OnChange event
CM_WANTSPECIALKEY TCMWantSpecialKey sent by TControl in response to
(CM_BASE + 30) CN_KEYDOWN and CN_KEYUP
CM_INVOKEHELP wParam = command, sent by TApplication to the main
(CM_BASE + 31) lParam = Data form on help invoking (nowhere
used)
CM_WINDOWHOOK wParam = 0 if hooking sent by TApplication when a form
(CM_BASE + 32) = 1 if unhooking hooks or unhooks the main
lParam = @@Hook window proc
CM_RELEASE no params sent by TForm on release of itself
(CM_BASE + 33) and by TFindDialog when to notify
its redirector
CM_SHOWHINTCHANGED no params used when a control's ShowHint
(CM_BASE + 34) property is changed
CM_PARENTSHOWHINTCHANGED no params used at various places (in
(CM_BASE + 35) response to a
CM_SHOWHINTCHANGED
message, when reading a controls
data from a stream etc.)
CM_SYSCOLORCHANGE no params sent in response to a
(CM_BASE + 36) WM_SYSCOLORCHANGE
message (by TWinControl)
CM_WININICHANGE TWMWinIniChange sent by TWinControl in response
(CM_BASE + 37) to WM_WININICHANGE
CM_FONTCHANGE no params sent by TWinControl in response
(CM_BASE + 38) to WM_FONTCHANGE
CM_TIMECHANGE no params sent by TWinControl in response
(CM_BASE + 39) to WM_TIMECHANGE
CM_TABSTOPCHANGED no params used when a control's TabStop
(CM_BASE + 40) property is changed
CM_UIACTIVATE no params sent by TCustomForm when the
(CM_BASE + 41) active control changes and is used
primarily for OLE controls
CM_UIDEACTIVATE no params counterpart to CM_UIACTIVATE
(CM_BASE + 42)
CM_DOCWINDOWACTIVATE wParam = active, sent by TCustomForm on
(CM_BASE + 43) lParam = 0 activation/deactivation to the
current OLE control if there's one
CM_CONTROLLISTCHANGE wParam = Control, sent by TWinControl on inserting/
(CM_BASE + 44) lParam = 1 if inserting removing a child control
else 0
CM_GETDATALINK no params sent by TDBCtrlGrid to retrieve an
(CM_BASE + 45) eventual data link of a control
(Message.Result returns the link if
applicable)
CM_CHILDKEY TCMChildKey sent by TWinControl in response
(CM_BASE + 46) to CN_KEYDOWN and
CN_SYSKEYDOWN and by
TActiveXControl when translating accelerator keys
CM_DRAG TCMDrag sent by internal drag routines
(CM_BASE + 47) (Controls.pas) and used by
TWinControl to trigger the
various drag and dock events
CM_HINTSHOW wParam = 0, sent by TApplication on hint
(CM_BASE + 48) lParam = @THintInfo activation and on mouse
messages
CM_DIALOGHANDLE wParam = 0, sent by TApplication when
(CM_BASE + 49) lParam = Handle when DialogHandle is read or written to
setting