所有CM_消息的说明
这些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_消息的说明的更多相关文章
- VCL里为什么要用类函数代替API,为什么要用CM_消息代替虚函数
之所以要用类函数代替API,是因为VCL对它做了一些包装,好在API起作用之前和之后做一些额外的事情:通知和判断等等.之所以类函数要包装一个CM_消息,是因为这样方便程序员(在调用类函数的基础上)截断 ...
- TWinControl的消息覆盖函数大全(41个WM_函数和31个CM_函数,它的WndProc就处理鼠标(转发)、键盘(取消拖动)、焦点、和WM_NCHITTEST一共4类消息)
注意,这些函数只有Private一种形式(也就是不允许覆盖,但仍在动态表格中): 其中TWinControl对TControl有10个消息进行了覆盖(红色标记),其中有2个是WM_消息,8个是CM_消 ...
- VCL定义和使用CM_Message的原因(主要是内部控制,同时可简化参数传递,还可截住消息,统一走消息路线,还可省内存)
内部控制是指,做了某些操作后产生某些效果,但是Windows系统本身不提供这样的消息,应此不得不自定义.比如父窗口改变了字体,那么所有子窗口也都应该改变字体,至少也得通知一下它们,让子控件自己决定是否 ...
- 一行代码设置TForm颜色的前世今生(属性赋值引起函数调用,然后发消息实现改变显示效果),TForm的初始颜色在dfm中设置了clBtnFace色
来自万一的帖子:http://www.cnblogs.com/del/archive/2008/04/27/1173658.html的确做到了一行代码设置TForm控件的颜色(一点感想:Delphi程 ...
- TControl的消息覆盖函数大全(15个WM_函数和17个CM_函数,它的WndProc就处理鼠标与键盘消息)
注意,这些函数只有Private一种形式(也就是不允许覆盖,但仍在动态表格中)(特别注意,这里居然没有WM_PAINT函数): TControl = class(TComponent) private ...
- Messages.pas里的消息
一.Windows 消息大全 这张表拷贝自万一兄的帖子:http://www.cnblogs.com/del/archive/2008/02/25/1079970.html 但是我希望自己能把这些消息 ...
- Delphi——Window 消息 - 转载▼
Delphi是Borland公司的一种面向对象的可视化软件开发工具. Delphi集中了Visual C++和Visual Basic两者的优点:容易上手.功能强大,特别是在界面设计.数据库编程.网络 ...
- 消息函数一般是私有的,因为不需要程序员显示的调用,但子类如果需要改写这个方法,则改成保护方法Protected
许多的面向对象程序设计语言都支持对消息的处理.消息处理是一种动态响应客户类发出的请求,它与过程调用不同.过程调用中,客户类必须知道服务类提供了哪些过程,以及每个过程的调用约定,并且在调用时需要明确指出 ...
- 深入delphi编程理解之消息(二)发送消息函数及消息编号、消息结构体的理解
一.delphi发送消息的函数主要有以下三个: (一).SendMessage函数,其原型如下: function SendMessage( hWnd: HWND; {目标句柄} Msg: UINT; ...
随机推荐
- Effective C++ Item 40 明智而审慎地使用多重继承
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie 经验:多重继承比单一继承复杂.它可能导致新的歧义性,以及对 virtual 继承的须要 演示 ...
- 动态规划之插头DP入门
基于联通性的状态压缩动态规划是一类非常典型的状态压缩动态规划问题,由于其压缩的本质并不像是普通的状态压缩动态规划那样用0或者1来表示未使用.使用两种状态,而是使用数字来表示类似插头的状态,因此.它又被 ...
- C++自增和自减运算符(--和++)
在C和C++中,常在表达式中使用自增(++)和自减(--)运算符,他们的作用是使变量的值增1或减1,如:++i(在使用i之前,先使i的值加1,如果i的原值为3,则执行j=++i后,j的值为4)--i ...
- 【转】java--final
1.final数据 许多程序设计语言都有自己的办法告诉编译器某个数据是“常数”.常数主要应用于下述两个方面: (1) 编译期常数,它永远不会改变 (2) 在运行期初始化的一个值,我们不希望它发生变化 ...
- android开发过程中遇到的小问题
转自:http://www.sctarena.com/Article/Article.asp?nid=50701.在编写xml布局的时候,总是提示[Accessibility] Missing ...
- 分享非常有用的Java程序 (关键代码) (三)---创建ZIP和JAR文件
原文:分享非常有用的Java程序 (关键代码) (三)---创建ZIP和JAR文件 import java.util.zip.*; import java.io.*; public class Zip ...
- GitLab 之 Linux十分钟快装
原文链接:http://www.cnblogs.com/highsea90/p/5191340.html 先把 Shell 命令贴出来,楼主以 CentOS release 6.5 (Final) 6 ...
- C++界面库
刚开始用C++做界面的时候,根本不知道怎么用简陋的MFC控件做出比较美观的界面,后来就开始逐渐接触到BCG Xtreme ToolkitPro v15.0.1,Skin++,等界面库,以及一些网友自 ...
- shapefile 编码错误问题解决 Wrong codepage of shapefile Warning 1: One or several characters couldn't be converted correctly from UTF-8 to ISO-8859-1.
linux下运行,因为大部分shapefile 文件,在使用时都没有指定字符集,所以qgis只能从环境变量中获取设置环境变量中获取SHAPE_ENCODING. 目前唯一的解决办法就是设置环境变量 $ ...
- Flexigrid的编辑功能
editCells:function(){ if(!isEditing){ isEditing = true; $('tbody tr',$(t)).each(function () { for(va ...