这些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. 网络爬虫 kamike.collect

    Another Simple Crawler 又一个网络爬虫,可以支持代理服务器的FQ爬取. 1.数据存在mysql当中. 2.使用时,先修改web-inf/config.ini的数据链接相关信息,主 ...

  2. windows phone7开发环境配置错误

    遇到下面这样一个问题:在配置windows phoe7开发环境的时候出现如下错误,以及相应的解决方案,希望对大家有所帮助. 装完环境后出现下面错误: [caption id="attachm ...

  3. Solr搜索结果说明

    在admin页面,输入相关内容后,会返回xml格式的内容.说明如下: [html] view plaincopy <?xml version="1.0" encoding=& ...

  4. 简单的http代理服务器

    简单的http代理服务器 本项目课程是基于 Python 实现的一个简单的 HTTP 代理服务器,要求用户需了解 Python 基础和一定的 HTTP 服务器基础知识.

  5. 第14周 项目三-OOP版电子词典

    做一个简单的电子词典.在文件dictionary.txt中,保存的是英汉对比的一个词典,词汇量近8000个,英文.中文释义与词性间用'\t'隔开. (1)编程序,由用户输入英文词.显示词性和中文释义. ...

  6. 在Windows下搭建C++11 编译环境(附下载,包括mingw-build,TDM-GCC, nuwen MinGW Distro)

    由于现实的一些原因,并不是所有人都能很方便的享受到C++11 特性.特别是C++ Primer 第五版 和 The C++ Programming Language 第四版等全面C++ 11 铺开以后 ...

  7. Cppcheck 1.54 C/C++静态代码分析工具

    Cppcheck是一个C/C++代码分析工具,只检测那些编译器通常无法检测到的bug类型.   官方上建议让编译器提供尽量多的警告提示:1.使用Visual C++的话,应使用警告等级4 2.使用GC ...

  8. 每周日与周四《红酒屋》探戈舞会"Wine Bar" Milonga_原生态拉丁_新浪博客

    每周日与周四<红酒屋>探戈舞会"Wine Bar" Milonga_原生态拉丁_新浪博客     每周日与周四<红酒屋>探戈舞会"Wine Bar ...

  9. 【Unity技巧】使用单例模式Singleton

    这几天想把在实习里碰到的一些好的技巧写在这里,也算是对实习的一个总结.好啦,今天要讲的是在Unity里应用一种非常有名的设计模式——单例模式. 开场白 单例模式的简单介绍请看前面的链接,当然网上还有很 ...

  10. 以交互方式使用exp/imp的演示

    众所周知,用exp/imp对数据库进行逻辑备份.包含表.用户,整个数据库,我们通常所熟悉的是使用命令行指定參数的方式来做的.以下我来演示一下不太经常使用的以交互方式的操作,操作非常easy.就是仅仅要 ...