VCL Control Messages (values):parameters:comments:
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
CM_BASE
($B000)
CM_ACTIVATE no paramsused 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 TCMDialogKeyused 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_FOCUSCHANGEDTCMFocusChangedused in forms when the active
(CM_BASE + 7) control changes
CM_PARENTFONTCHANGEDif 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_ENABLEDCHANGEDno 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 paramsused 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 paramsused 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_DOCWINDOWACTIVATEwParam = active, sent by TCustomForm on
(CM_BASE + 43) lParam = 0 activation/deactivation to the
current OLE control if there's one
CM_CONTROLLISTCHANGEwParam = 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
variousdrag 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 and the applications handle has
wParam = 1, not yet been created, when
lParam = 0 when reading reading the dialog handle then
Message.Result contains the new
handle
CM_ISTOOLCONTROL no paramssent by TOLEForm to determine if
(CM_BASE + 50) its child controls are tool controls,
used only by TCustomPanel
CM_RECREATEWND no params sent by
(CM_BASE + 51) TWinControl.RecreateWnd and
TFieldDataLink.UpdateRightToLeft
CM_INVALIDATE wParam = 1 if repaint is sent by TWinControl.Invalidate
(CM_BASE + 52) required else 0, to notify itself and its parent
lParam = 0 of the invalidation request
CM_SYSFONTCHANGED no params sent by TScreen if its IconFont is
(CM_BASE + 53) changed and by TControl when
reading properties from stream or
changing DesktopFont
CM_CONTROLCHANGE TCMControlChange sent by TWinControl when
(CM_BASE + 54) inserting or removing a child
control
CM_CHANGED wParam = 0, sent by TControl.Changed
(CM_BASE + 55) lParam = Self
CM_DOCKCLIENT TCMDockClientsent by TWinControl.DockDrop to
(CM_BASE + 56)determine whether docking is
allowed or not
CM_UNDOCKCLIENT TCMUndockClientsent by TControl on Destroy, by
(CM_BASE + 57) TWinControl.DoUnDock and
TCustomDockForm on removing a
child control
CM_FLOAT TCMFloat sent by internal drag/dock routines
(CM_BASE + 58) to make a control floating
CM_BORDERCHANGED no params sent by TWinControl when
(CM_BASE + 59) BorderWidth or BevelWidth styles
are changed
CM_BIDIMODECHANGED no params sent by TControl.SetBiDiMode
(CM_BASE + 60)
CM_PARENTBIDIMODECHANGED no paramssent at various places (in
(CM_BASE + 61) response to
CM_BIDIMODECHANGED, when
reading a control from a stream,
when reading a custom from from
a stream, when BiDiMode of
TApplication changes and when
TCustomRichEdit is created)
CM_ALLCHILDRENFLIPPED no paramssent by
(CM_BASE + 62) TWinControl.DoFlipChildren
CM_ACTIONUPDATE wParam = 0,sent by TContainedAction.Update
(CM_BASE + 63)lParam = Action
CM_ACTIONEXECUTE wParam = 0, sent by TContainedAction.Execute
(CM_BASE + 64) lParam = Action
CM_HINTSHOWPAUSE wParam = 1 if hint wassent by TApplication on mouse
(CM_BASE + 65) active messages,when there's a new
lParam = time intervalcontrol under the mouse and has
when to show new hintShowHint set to True
CM_DOCKNOTIFICATION TCMDocNotification sent by
(CM_BASE + 66) TControl.SendDockNotification
which is executed in response to
CM_VISIBLECHANGED and
WM_SETTEXT
CM_MOUSEWHEEL TCMMouseWheel general mousewheel message
(CM_BASE + 67) generated either by the registered
mouse wheel message or
WM_MOUSEWHEEL (not
Win95) and sent by TWInControl
VCL Control Notifications
VCL Control Notifications are just reflections of the corresponding WM_xxx messages. They are sent by a window to their parent window (not VCL but Windows). This makes in Delphi no sense as the parent knows basically nothing about its child windows and can therefore not handle them. Each of these messages contains in its lParam the handle of the child window which has sent the message. The VCL does nothing else then to add CN_BASE to the message value and sends the message then to the window which created it originally. This way windows can handle their special messages themselves.
Control Notification Value
CN_BASE $BC00
CN_CHAR CN_BASE + WM_CHAR
CN_CHARTOITEMCN_BASE + WM_CHARTOITEM
CN_COMMAND CN_BASE + WM_COMMAND
CN_COMPAREITEMCN_BASE + WM_COMPAREITEM
CN_CTLCOLORBTN CN_BASE + WM_CTLCOLORBTN
CN_CTLCOLORDLG CN_BASE + WM_CTLCOLORDLG
CN_CTLCOLOREDIT CN_BASE + WM_CTLCOLOREDIT
CN_CTLCOLORLISTBOX CN_BASE + WM_CTLCOLORLISTBOX
CN_CTLCOLORMSGBOX CN_BASE + WM_CTLCOLORMSGBOX
CN_CTLCOLORSCROLLBAR CN_BASE + WM_CTLCOLORSCROLLBAR
CN_CTLCOLORSTATIC CN_BASE + WM_CTLCOLORSTATIC
CN_DELETEITEM CN_BASE + WM_DELETEITEM
CN_DRAWITEM CN_BASE + WM_DRAWITEM
CN_KEYDOWN CN_BASE + WM_KEYDOWN
CN_KEYUP CN_BASE + WM_KEYUP
CN_HSCROLL CN_BASE + WM_HSCROLL
CN_MEASUREITEM CN_BASE + WM_MEASUREITEM
CN_NOTIFY CN_BASE + WM_NOTIFY
CN_PARENTNOTIFY CN_BASE + WM_PARENTNOTIFY
CN_SYSKEYDOWN CN_BASE + WM_SYSKEYDOWN
CN_SYSCHAR CN_BASE + WM_SYSCHAR
CN_VKEYTOITEM CN_BASE + WM_VKEYTOITEM
CN_VSCROLL CN_BASE + WM_VSCROLL
分享到:
相关推荐
nrComm Lib Component library for Delphi (VCL) The nrComm Lib is set of Delphi VCL components, classes and routines for serial communication tasks. Library helps to get access to various devices: ...
- VCL框架:Delphi的Visual Component Library(VCL)包含了大量的预定义控件,覆盖了日常开发中所需的各种功能。 2. **常用控件及应用** - TLabel:用于显示静态文本,是界面上最常见的元素。 - TEdit:用于...
sgcWebSockets is a complete package providing access to WebSockets protocol, allowing to create WebSockets Servers, Intraweb Clients or WebSocket Clients in VCL, Lazarus/FPC and Firemonkey ...
VCLZip Native Delphi Zip/UnZip Component! (VCLZip Lite: Version 2.23 April 14th, 2002) (VCLZip Pro: Version 3.03 October 4th, 2003)IMPORTANT: If installing the registered version, please be sure to ...
ICS - Internet Component Suite - V8 - Delphi 7 to RAD Studio 10 Seattle ======================================================================= (Aka FPIETTE's Components) Revised: March 3, 2016 ...
在Dephi中,按钮控件通常是TButton类型,它是VCL(Visual Component Library)的一部分。创建按钮并在界面上显示非常简单,你可以在Form Designer中直接拖放一个TButton到表单上,然后通过属性窗口调整其属性,如...
TTimer是VCL(Visual Component Library)框架中的一个关键组件,它允许开发者创建在指定时间间隔内执行代码的定时任务。在本源码中,我们可能看到如何设置和使用Interval属性来实现特定的程序功能。 首先,了解...
Client/server database engine with server component and custom messages Easy-to-use multi-user (file-server) database engine Multi-thread access Storing all tables inside the single
Timer组件在Delphi8中属于VCL(Visual Component Library)的一部分,它位于`System.Timers`单元。Timer组件的主要功能是每隔一定的时间间隔(以毫秒为单位)触发OnTimer事件。这个时间间隔可以通过调整Timer组件的...
在Delphi编程环境中,`DisplayRect`属性是一个重要的概念,主要用在VCL(Visual Component Library)组件中,特别是涉及到图形界面和控件布局时。`DisplayRect`属性通常用于获取一个控件可视区域的矩形边界,这个...
- **VCL组件库**:Delphi提供了VCL(Visual Component Library)组件库,这是一套丰富且可定制的图形用户界面组件集合,极大简化了GUI的构建过程。 - **拖拽操作**:通过简单的拖拽操作即可完成控件的放置与布局,...
该项目是基于Windows平台的,使用VCL(Visual Component Library)技术用Delphi开发的一个快速文件夹搜索工具。VCL是Delphi中的一个核心组件库,它包含了大量的预先编写好的可视和非可视组件,用于构建图形用户界面...
VCL(Visual Component Library)是Delphi提供的可视化组件库,用于快速构建Windows应用程序。 **4.2 表单的认识** - **通过帮助文件了解表单在VCL中的位置**:查阅Delphi的帮助文档。 - **从实例了解表单的实际...
在Delphi或C++ Builder等基于VCL(Visual Component Library)的开发环境中,我们可以利用`TApplication`对象的`OnMessage`事件来拦截全局的消息。`OnMessage`事件允许我们自定义消息处理逻辑,它会在消息被传递到...
在Delphi中,可以使用VCL(Visual Component Library)框架来创建和管理应用程序的界面元素。 标题滚动代码主要涉及到Windows API的使用,因为Delphi是建立在Windows平台上,所以可以调用Windows API函数来改变窗口...
这个项目使用了VCL(Visual Component Library)框架,这是Delphi编程语言的一个核心部分,用于构建图形用户界面(GUI)应用程序。 描述中的"that project allowing to have calculator that better than system ...
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, ActiveX, ComObj, SHDocVw; type TForm1 = class(TForm) ...
- **定义**: VCL(Visual Component Library)是Delphi/C++Builder的核心类库,提供了一系列预构建的UI组件和类,用于快速开发Windows应用程序。 - **特性**: - **封装纯粹**:简化了复杂的Win32 API调用。 - **可...
TShockwaveFlash控件是VCL(Visual Component Library)的一部分,它允许开发者直接与SWF文件进行交互。 1. **屏蔽右键菜单**: 要屏蔽Flash的右键菜单,我们需要捕获并处理鼠标点击事件。在Delphi中,我们可以为...
Drag and Drop Component Suite Version 4.1 Field test 5, released 16-dec-2001 ?1997-2001 Angus Johnson & Anders Melander http://www.melander.dk/delphi/dragdrop/ ---------------------------------------...