这些CM消息,居然在Delphi的帮助里是没有任何说明的,真是昏倒。意外在高手的书里找到了所有说明,说明如下:

Message Constant Value Description

cm_Base $B000 Base constant used by all other component messages.
cm_Activate cm_Base + 0; Specific to forms. Sent when form is first displayed and whenever focus changes to a different modeless form within the same application.
cm_Deactivate cm_Base + 1; Specific to forms. Always sent before a cm_Activate message to the form losing the focus.
cm_GotFocus cm_Base + 2; No longer used.
cm_LostFocus cm_Base + 3; No longer used.
cm_CancelMode cm_Base + 4; Sent to a focused control providing opportunity to cancel any internal modes before losing focus, such as capturing mouse input.
cm_DialogKey cm_Base + 5; A key was pressed that has special meaning in a dialogbox. (For example, Tab, Enter, the Arrow keys, and so on.)
cm_DialogChar cm_Base + 6; Sent to the form when characters are pressed and a component that does not accept keyboard input has the focus.
cm_FocusChanged cm_Base + 7; Sent to the form indicating which control now has the focus.
cm_ParentFontChanged cm_Base + 8; The ParentFont property has changed.
cm_ParentColorChanged cm_Base + 9; The ParentColor property has changed.
cm_HitTest cm_Base + 10; Sent when a control needs to determine if a given point is to be considered on the component.
cm_VisibleChanged cm_Base + 11; The Visible property has changed.
cm_EnabledChanged cm_Base + 12; The Enabled property has changed.
cm_ColorChanged cm_Base + 13; The Color property has changed.
cm_FontChanged cm_Base + 14; The Font property has changed.
cm_CursorChanged cm_Base + 15; The Cursor property has changed.
cm_Ctl3dChanged cm_Base + 16; The Ctl3D property has changed.
cm_ParentCtl3dChanged cm_Base + 17; The ParentCtl3D property has changed.
cm_TextChanged cm_Base + 18; The Text or Caption property has changed.
cm_MouseEnter cm_Base + 19; Sent when the mouse pointer becomes positioned over the component.
cm_MouseLeave cm_Base + 20; Sent when the mouse pointer is dragged outside of the bounds of the component.
cm_MenuChanged cm_Base + 21; Sent to the form when a menu item has changed.
cm_AppKeyDown cm_Base + 22; Used to transmit menu shortcut key events trapped by the Application object and forwarded on to the main form.
cm_AppSysCommand cm_Base + 23; Used to transmit wm_SysCommand messages from the Application object to the main form.
cm_ButtonPressed cm_Base + 24; A SpeedButton was pressed.
cm_ShowingChanged cm_Base + 25; The Showing property has changed.
cm_Enter cm_Base + 26; A component receives the input focus.
cm_Exit cm_Base + 27; A component loses the input focus.
cm_DesignHitTest cm_Base + 28; Sent when mouse pointer moved over component while in design-mode.
cm_IconChanged cm_Base + 29; The Icon property has changed.
cm_WantSpecialKey cm_Base + 30; Sent to a component when a special key (for example, Tab, Enter, the Arrow keys, and so on) is pressed. Allows a component to handle special keys in a particular way.
cm_InvokeHelp cm_Base + 31; Sent by a DLL’s Application object to the main Application object using the DLL when on-line help needs to be activated.
cm_WindowHook cm_Base + 32; Sent by a DLL’s Application object to the main Application object using the DLL to establish a window hook.
cm_Release cm_Base + 33; Sent by a form to itself indicating that the form should be destroyed.
cm_ShowHintChanged cm_Base + 34; The ShowHint property has changed.
cm_ParentShowHintChanged cm_Base + 35; The ParentShowHint property has changed.
cm_SysColorChange cm_Base + 36; The system colors have been altered.
cm_WinIniChange cm_Base + 37; A change has been made to the Win.ini file.
cm_FontChange cm_Base + 38; The Font property has changed.
cm_TimeChange cm_Base + 39; The system time has changed.
cm_TabStopChanged cm_Base + 40; The TabStop property has changed.
cm_UIActivate cm_Base + 41; When a form receives the input focus, it sends this message to the active control. TOleControl handles this message in order to activate the OLE Object.
cm_UIDeactivate cm_Base + 42; When a form loses the input focus, it sends this message to the active control. TOleControl handles this message in order to deactivate the OLE Object
cm_DocWindowActivate cm_Base + 43; Sent to the active OLE control when a form is activated or deactivated.
cm_ControlListChange cm_Base + 44; Sent only to window controls (such as descendants of TWinControl) when a component is added to or removed from the Controls list.
cm_GetDataLink cm_Base + 45; Sent by the TDBCtrlGrid component to embedded dataaware components to obtain each control’s data link object.
cm_ChildKey cm_Base + 46; Sent to a component that has the input focus and a key is pressed. The message is then propagated to its parent, and so on.
cm_Drag cm_Base + 47; High-level message sent to a component indicating one of the following drag events: Enter, Leave, Move, Drop, Cancel, or Find Target.
cm_HintShow cm_Base + 48; Sent to a component before displaying its hint.
cm_DialogHandle cm_Base + 49; Sent by a DLL’s Application object to the main Application object using the DLL in order to set the DialogHandle property.
cm_IsToolControl cm_Base + 50; Sent by an OLE container to aligned components giving them the opportunity to remain visible when the embedded OLE object is activated.
cm_RecreateWnd cm_Base + 51; The underlying window control needs to be recreated. Used by TActiveXControl.
cm_Invalidate cm_Base + 52; The underlying window control needs to be invalidated. Used by TActiveXControl.

摘自《Developing Custom Delphi3 Components》 p270

另有:http://blog.csdn.net/linzhengqun/article/details/255363

所有CM_消息的说明的更多相关文章

  1. VCL里为什么要用类函数代替API,为什么要用CM_消息代替虚函数

    之所以要用类函数代替API,是因为VCL对它做了一些包装,好在API起作用之前和之后做一些额外的事情:通知和判断等等.之所以类函数要包装一个CM_消息,是因为这样方便程序员(在调用类函数的基础上)截断 ...

  2. TWinControl的消息覆盖函数大全(41个WM_函数和31个CM_函数,它的WndProc就处理鼠标(转发)、键盘(取消拖动)、焦点、和WM_NCHITTEST一共4类消息)

    注意,这些函数只有Private一种形式(也就是不允许覆盖,但仍在动态表格中): 其中TWinControl对TControl有10个消息进行了覆盖(红色标记),其中有2个是WM_消息,8个是CM_消 ...

  3. VCL定义和使用CM_Message的原因(主要是内部控制,同时可简化参数传递,还可截住消息,统一走消息路线,还可省内存)

    内部控制是指,做了某些操作后产生某些效果,但是Windows系统本身不提供这样的消息,应此不得不自定义.比如父窗口改变了字体,那么所有子窗口也都应该改变字体,至少也得通知一下它们,让子控件自己决定是否 ...

  4. 一行代码设置TForm颜色的前世今生(属性赋值引起函数调用,然后发消息实现改变显示效果),TForm的初始颜色在dfm中设置了clBtnFace色

    来自万一的帖子:http://www.cnblogs.com/del/archive/2008/04/27/1173658.html的确做到了一行代码设置TForm控件的颜色(一点感想:Delphi程 ...

  5. TControl的消息覆盖函数大全(15个WM_函数和17个CM_函数,它的WndProc就处理鼠标与键盘消息)

    注意,这些函数只有Private一种形式(也就是不允许覆盖,但仍在动态表格中)(特别注意,这里居然没有WM_PAINT函数): TControl = class(TComponent) private ...

  6. Messages.pas里的消息

    一.Windows 消息大全 这张表拷贝自万一兄的帖子:http://www.cnblogs.com/del/archive/2008/02/25/1079970.html 但是我希望自己能把这些消息 ...

  7. Delphi——Window 消息 - 转载▼

    Delphi是Borland公司的一种面向对象的可视化软件开发工具. Delphi集中了Visual C++和Visual Basic两者的优点:容易上手.功能强大,特别是在界面设计.数据库编程.网络 ...

  8. 消息函数一般是私有的,因为不需要程序员显示的调用,但子类如果需要改写这个方法,则改成保护方法Protected

    许多的面向对象程序设计语言都支持对消息的处理.消息处理是一种动态响应客户类发出的请求,它与过程调用不同.过程调用中,客户类必须知道服务类提供了哪些过程,以及每个过程的调用约定,并且在调用时需要明确指出 ...

  9. 深入delphi编程理解之消息(二)发送消息函数及消息编号、消息结构体的理解

    一.delphi发送消息的函数主要有以下三个: (一).SendMessage函数,其原型如下: function SendMessage( hWnd: HWND; {目标句柄} Msg: UINT; ...

随机推荐

  1. Linux下VNC的安装和开机启动

    1.确认VNC是否安装默认情况下,Red Hat Enterprise Linux安装程序会将VNC服务安装在系统上.确认是否已经安装VNC服务及查看安装的VNC版本[root@testdb ~]# ...

  2. (step7.2.3)hdu 2554(N对数的排列问题——简单数论)

    题目大意:输入一个整数n,表示有n对整数.判断能否出现一种情况就是2个1之间有1个数,2个2之间有2个数..... 解题思路: 准备知识: ①n对数,共2*n个数.所以要有2*n个位置来放置这2*n个 ...

  3. Poj 2777 Count Color(线段树基础)

    又毁三观了.......虽然题目数据有坑:区间[a,b]可能会有a>b的情况,但是我一开始没有考虑它也能过. 此外莫名其妙的TLE #include <iostream> #incl ...

  4. Http的操作(不传递参数)

    ttpResponse  httpResponse = null;       HttpEntity  httpEntity = null; HttpGet httpGet = new HttpGet ...

  5. LDF文件过大的解决办法

    检查扎兰屯服务器的时候,发现其中一个分区的原空间有300多个G,但只余下了80多个G.检查了一下,发现某库ldf文件过大,竟然达到了280多个G. 这如何得了,再这样下去,硬盘怎能受得了? 尝试用收缩 ...

  6. 快速傅里叶变换应用之二 hdu 4609 3-idiots

    快速傅里叶变化有不同的应用场景,hdu4609就比较有意思.题目要求是给n个线段,随机从中选取三个,组成三角形的概率. 初始实在没发现这个怎么和FFT联系起来,后来看了下别人的题解才突然想起来:组合计 ...

  7. iOS 用GDataXMLNode创建和解析XML

    原文地址:http://blog.csdn.net/gf771115/article/details/7718403 NSError *error; //    NSString *path = [[ ...

  8. BZOJ 1085: [SCOI2005]骑士精神( IDDFS + A* )

    一开始写了个 BFS 然后就 T 了... 这道题是迭代加深搜索 + A* -------------------------------------------------------------- ...

  9. Android常用秘籍总结

    一.无法向模拟器push文件,显示read-only file system $adb shell mount -o remount rw/ 确保模拟器有sd卡 二.Android模拟按键 #adb ...

  10. Research notes for Scientific Writing

    Noun. complacency n. 自得;自鸣得意 nomenclature  n. 专业术语:e.g. the nomenclature of music; 音乐的专门术语 Verb. abs ...