所有CN_消息的说明

Notification Message Corresponding Windows
Constant Message Description

cn_CharToItem wm_CharToItem The wm_CharToItem message is sent to the parent of a list box when a character is pressed.
cn_Command wm_Command The wm_Command message is sent when the user selects a menu item, when a control sends a notification message to its parent window, or when an accelerator keystroke is translated.
cn_CompareItem wm_CompareItem The wm_CompareItem message is sent to the parent of an owner-draw combo box or list box to determine the relative position of a new item in the sorted list.
cn_CtlColorBtn wm_CtlColorBtn The wm_CtlColorBtn message is sent to the parent window of a button when the button is about to be drawn.
cn_CtlColorDlg wm_CtlColorDlg The wm_CtlColorDlg message is sent to a dialog box before Windows draws the dialog box.
cn_CtlColorEdit wm_CtlColorEdit The wm_CtlColorEdit message is sent to the parent window of an edit field when the control is about to be drawn.
cn_CtlColorListBox wm_CtlColorListBox The wm_CtlColorListBox message is sent to the parent window of a list box when the list box is about to be drawn.
cn_CtlColorMsgBox wm_CtlColorMsgBox The wm_CtlColorMsgBox message is sent to the owner window of a message box when the message box is about to be displayed.
cn_CtlColorScrollBar wm_CtlColorScrollBar The wm_CtlColorScrollBar message is sent to the parent window of a scroll bar when the control is about to be drawn.
cn_CtlColorStatic wm_CtlColorStatic The wm_CtlColorStatic message is sent to the parent window of a static control when the control is about to be drawn.
cn_DeleteItem wm_DeleteItem The wm_DeleteItem message is sent to the parent window of a list box or combo box when each item in the list is deleted.
cn_DrawItem wm_DrawItem The wm_DrawItem message is sent to the parent window of an owner-drawn button, combo box, list box, list view, or menu when the control needs to be painted.
cn_HScroll wm_HScroll The wm_HScroll message is sent to the parent window of a horizontal scroll bar control when a scroll event occurs in the control.
cn_MeasureItem wm_MeasureItem The wm_MeasureItem message is sent to the parent window of an owner-drawn button, combo box, list box, list view control, or menu item when the control or menu is created in order to determine the control’s size.
cn_ParentNotify wm_ParentNotify The wm_ParentNotify message is sent to the parent of a control when the control is created or destroyed, or when the user clicks a mouse button while the cursor is over the control.
cn_VKeyToItem wm_VKeyToItem The wm_VKeyToItem message is sent to the parent of a list box when a key is pressed.
cn_VScroll wm_VScroll The wm_VScroll message is sent to the parent window of a vertical scroll bar control when a scroll event occurs in the control.
cn_KeyDown wm_KeyDown The wm_KeyDown message is posted to the window with the keyboard focus when a key is pressed.
cn_KeyUp wm_KeyUp The wm_KeyUp message is posted to the window with the keyboard focus when a key is released.
cn_Char wm_Char The wm_Char message is posted to the window with the keyboard focus when a wm_KeyDown message is translated by the TranslateMessage function.
cn_SysKeyDown wm_SysKeyDown The wm_SysKeyDown message is posted to the window with the keyboard focus when the user holds down the ALT key and then presses another key.
cn_SysChar wm_SysChar The wm_SysChar message is posted to the window with the keyboard focus when the user holds down the ALT key and then presses another key and releases it.
cn_Notify wm_Notify The wm_Notify message is sent to the parent window of a control when an event has occurred in the control or when the control requires some kind of information.

摘自《Developing Custom Delphi3 Components》 p347

时间: 2024-12-20 22:03:39

所有CN_消息的说明的相关文章

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

注意,这些函数只有Private一种形式(也就是不允许覆盖,但仍在动态表格中): TWinControl = class(TControl) private // 41个windows消息,几乎全部消息都是私有函数(因为不需要别人来调用).很多都是覆盖消息,也有少部分是首次出现. // 总结规律:直接接受消息的函数都起一个中转站的作用,其函数内容都十分简单. // WM_PAINT第一次出现,由某些直接继承Win控件的类使用.而图形控件和自绘控件会自己响应这个消息. // TControl 类控

CN消息的来源——父窗口不知道怎么处理,于是把这个消息加上CN_BASE在分发到实际的子窗体

VCL存在一些非API消息以供其内部使用,为什么要这样做呢?这要从WM_COMMAND & WM_NOTIFY消息说起,我们说WM_COMMAND消息并不是直接发给实际产生消息的窗体,而是发送到它的父窗体.但是父窗体几乎不可能用通常方法处理这些根本不知道如何处理的消息,于是父窗体把这个消息加上CN_BASE在分发到实际的子窗体中,然后由实际的子窗体处理(这句话解释够清楚的). 比如TBitBtn元件为了在按钮表面绘制图象,处理了CN_DRAWITEM消息,这个消息处理函数是这样写的: FCanv

Delphi对于控件的SuperClassing

写博客写了这么久,但是一直不知道应该怎么样写函数之间的调用关系和执行顺序,因为不停的跳来跳去的,但是写的时候却只能顺序写调用关系,直到今天发现这种写法很不错: TButton创建窗口是在CreateWnd方法开始,下面是创建的一个大概流程:TButton.CreateWnd;| TWinControl.CreateWnd;| | TButton.CreateParams(var Params: TCreateParams);| | | TButtonControl.CreateParams(va

Messages.pas里的消息

一.Windows 消息大全 这张表拷贝自万一兄的帖子:http://www.cnblogs.com/del/archive/2008/02/25/1079970.html 但是我希望自己能把这些消息的注释都写上.特别简单的消息就不写了(否则反而无法一目了然),只写对我自己觉得值得注意的消息.我也没有整块的时间,有时间就每天写几个注释,就当是自己学习了.说到底,常用的Windows消息就这么多,共233个,全部了解清楚的话对编程是很有帮助的.Win32标准控件的消息更是有限的. 二.Delphi

Java - 微信公众号 - 消息回复

1.开发接入 (1)更改入门教程中的Controller:  注(验证是属于GET,然而交互是属于POST) @RequestMapping(value = "/getMsg", method = {RequestMethod.GET, RequestMethod.POST}) public void getMsg(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException

Modbus库开发笔记之二:Modbus消息帧的生成

前面我们已经对Modbus的基本事务作了说明,也据此设计了我们将要实现的主从站的操作流程.这其中与Modbus直接相关的就是Modbus消息帧的生成.Modbus消息帧也是实现Modbus通讯协议的根本. 1.Modbus消息帧分析 MODBUS协议在不同的物理链路上的消息帧有一些差异,但我们分析一下就会发现,在这些不同的消息帧中具有一下相同的部分,这对我们实现统一的数据操作非常重要,具体描述如下: (1).简单协议数据单元 MODBUS协议定义了一个与基础通信层无关的简单协议数据单元(PDU)

QCustomPlot 鼠标消息获取,以及对应坐标转换

1 首先在 MainWindow.h 中加入 消息处理程序(槽) private slots: void my_mouseMove(QMouseEvent* event); 2 在 MainWindow.cpp 中实现 (槽) void MainWindow::my_mouseMove(QMouseEvent* event) { //获取鼠标坐标点 int x_pos = event->pos().x(); int y_pos = event->pos().y(); // 把鼠标坐标点 转换为

分布式开放消息系统(RocketMQ)的原理与实践

分布式消息系统作为实现分布式系统可扩展.可伸缩性的关键组件,需要具有高吞吐量.高可用等特点.而谈到消息系统的设计,就回避不了两个问题: 消息的顺序问题 消息的重复问题 RocketMQ作为阿里开源的一款高性能.高吞吐量的消息中间件,它是怎样来解决这两个问题的?RocketMQ 有哪些关键特性?其实现原理是怎样的? 关键特性以及其实现原理 一.顺序消息 消息有序指的是可以按照消息的发送顺序来消费.例如:一笔订单产生了 3 条消息,分别是订单创建.订单付款.订单完成.消费时,要按照顺序依次消费才有意

替代alert的消息框和提示框

alert提示框由于外观不太友好,所以一般都不用alert了. 我在这里使用bootstrap的样式,写了一个可以单独显示消息,也可以确认取消的提示框. 使用的外观如下: 一:单独显示消息: 二:确认和取消: 单独显示消息的方法传递类型,信息,显示时间以及回掉函数.其中通过重载可以只传递信息. 确认和取消的方法传递类型,信息以及回掉函数.其中可以通过重载可以只传递信息和确认后执行的回掉函数.如果点击取消就去隐藏该提示框. 下面是代码: 1 //success 成功 2 //info 信息 3 /