所有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; ...
随机推荐
- 详解iOS7升级细节:引领视觉革命
下星期我们将看到的正式版将和WWDC上看到的大不相同.苹果六月份发布了全新版本的iOS操作系统——这是从2007年首次发布以来的最大的一次调整和改进.这次的改变招致许多批评.许多设计师在网站上晒出了他 ...
- Winform TabControl控件使用
运行效果: 代码: /// <summary> /// 添加选项卡 /// </summary> /// <param name="sender"&g ...
- 解决win7 中source insight没有courier new字节的问题
解决win7 中source insight没有courier new字节的问题 http://blog.csdn.net/season_hangzhou/article/details/18665 ...
- [转载] iOS开发分辨率那点事
1 iOS设备的分辨率 iOS设备,目前最主要的有3种(Apple TV等不在此讨论),按分辨率分为两类 iPhone/iPod Touch 普屏分辨率 320像素 x 480像素 Retina ...
- 05-UIKit(UITableViewController)
目录: 一.UITableViewController(表视图控制器) 二.委托协议 三.tableview工作过程(三问一响应) 四.UITableViewCell 回到顶部 一.UITableVi ...
- 面试中的Singleton
引子 “请写一个Singleton.”面试官微笑着和我说. “这可真简单.”我心里想着,并在白板上写下了下面的Singleton实现: 1 class Singleton 2 { 3 public ...
- SqlServer和Oracle中一些常用的sql语句6 存储过程
--不带参数的存储过程 CREATE procedure proc_sql1 as begin declare @i int set @i=0 while @i<26 begin print c ...
- CentOS桌面环境如何打开终端以及如何将终端加入右键
安装完CentOS的桌面环境后,默认在桌面以及右键是没有打开终端选项的,要想打开终端,可以由以下步骤: 在左上角菜单[Applications]--->[System Tools]---> ...
- 如何捕获winform程序全局异常?(续)
前言 上篇文章我提供了一种方案可以供我们捕获单线程程序中的所有未处理异常.但是如果程序是多线程,那么新增线程出现了异常上个方案就无能为力了.本着方案总比问题多的态度,我再给大家提供一种新的方案,供大家 ...
- 动态Pivot(2)
原文 http://book.51cto.com/art/200710/58875.htm 存储过程sp_pivot的实现包含糟糕的编程习惯和安全隐患.就像我在本章的前面提到的,微软强烈建议不要在用 ...