ON_NOTIFY用法
来源:互联网 发布:淘宝怎么看自己退款率 编辑:程序博客网 时间:2024/06/10 08:54
摘自:http://msdn.microsoft.com/zh-cn/library/749htf6k(v=VS.100).aspx
ON_NOTIFY: Handling WM_NOTIFY Messages in MFC Applications
The function CWnd::OnNotify handles notification messages. Its default implementation checks the message map for notification handlers to call. In general, you do not override OnNotify. Instead, you provide a handler function and add a message-map entry for that handler to the message map of your owner window's class.
ClassWizard, via the ClassWizard property sheet, can create the ON_NOTIFY message-map entry and provide you with a skeleton handler function. For more information on using ClassWizard to make this easier, see Mapping Messages to Functions.
The ON_NOTIFY message-map macro has the following syntax:
where the italicized parameters are replaced with:
Your member function must be declared with the following prototype:
where the italicized parameters are:
To specify that you want the member function OnKeydownList1 to handle LVN_KEYDOWN messages from the CListCtrl whose ID is IDC_LIST1, you would use ClassWizard to add the following to your message map:
In the example above, the function provided by ClassWizard is:
Note that ClassWizard provides a pointer of the proper type automatically. You can access the notification structure through either pNMHDR or pLVKeyDow.
- ON_NOTIFY用法
- ON_NOTIFY
- ON_NOTIFY
- ON_NOTIFY
- ON_NOTIFY
- ON_NOTIFY mfc
- wm_** & on_notify & on_notify_reflect
- ON_NOTIFY and WM_NOTIFY Messages
- ON_MESSAGE ,ON_COMMAND, ON_NOTIFY
- ON_NOTIFY 消息详解
- ON_COMMAND ON_MESSAGE ON_NOTIFY
- ON_NOTIFY处理消息
- ON_NOTIFY和ON_NOTIFY_EX
- ON_MESSAGE ,ON_COMMAND, , ON_NOTIFY
- ON_MESSAGE和ON_NOTIFY 区别
- ON_NOTIFY/ON_NOTIFY_REFLECT/ON_NOTIFY_RE
- TN061:ON_NOTIFY及WM_NOTIFY消息
- 终极理解ON_MESSAGE和ON_NOTIFY
- C# 操作Excel的类
- 回复怎么 没有积分类
- sed summary
- 分析一下Magento购物车SaveBilling的处理过程
- haha ,kaitongla
- ON_NOTIFY用法
- Thread和Looper以及Handler和Message详解
- bash 学习
- tcpdump 学习笔记
- 几种文件操作类
- 我要克服的
- Android中的MessageQueue,Handler,Looper和Thread
- WPF学习
- [NPWP笔记]Write a FTP client with two-process model