091101(星期天)OnNotify函数的msdn描述
来源:互联网 发布:linux添加路由脚本命令 编辑:程序博客网 时间:2024/05/16 18:59
1101 OnNotify函数的msdn描述
OnNotify
The framework calls this member function to inform the parent window通知其父窗口控件发生了一个事件 或者 控件需要某种信息 of a control that an event has occurred in the control or that the control requires some kind of information.
virtual BOOL OnNotify(
WPARAM wParam,
LPARAM lParam,
LRESULT* pResult
);
Parameters
wParam
Identifies the control that sends the message if the message is from a control. Otherwise, wParam is 0. 这个对控件的标示是句柄还是指针?参考下面的idFrom,最可能是控件ID。
lParam
Pointer to a notification message (NMHDR) 通过这个指针就把入参几乎是无限制的扩展了structure that contains the notification code and additional information. For some notification messages, this parameter points to a larger structure that has the NMHDR structure as its first member. 甚至可以是NMHDR为第一个子成员的更大结构。
typedef struct tagNMHDR {
HWND hwndFrom; // Window handle to the control sending a message
UINT idFrom; // Identifier of the control sending a message.
UINT code; // Notification code. This member can be a control-specific notification code or it can be one of the common notification codes
} NMHDR;
pResult 这个是出参
Pointer to an LRESULT variable in which to store the result code if the message is handled.
Return Value
An application returns nonzero 处理消息即为非零if it processes this message; otherwise 0.
Remarks
OnNotify processes the message map for control notification.
Override this member function in your derived class to handle the WM_NOTIFY message. An override will not process the message map unless the base class OnNotify is called. 可以试试重写这个虚函数,着重观察双击的时候“展开/合拢”的情况。
For more information on the WM_NOTIFY message, see Technical Note 61 (TN061), ON_NOTIFY and WM_NOTIFY messages. You may also be interested the related topics described in Control Topics, and TN062, Message Reflection for Windows Controls.
- 091101(星期天)OnNotify函数的msdn描述
- 091025(星期天)CTreeCtrl的msdn描述
- 重写CDlgSmbList的OnNotify函数
- 091103(星期二)重写CDlgSmbList的OnNotify函数
- 091029(星期四)OnCommand的msdn描述
- MSDN中关于SetWindowLongPtr和GetWindowLongPtr函数的描述错误
- OnNotify
- 091022(星期四)TreeCtrl的控件通知消息1 OnNotify
- msdn的类型成员描述
- 1128 socket的msdn描述
- 星期天的判断(规律)
- 091024(星期六)CDialog和CWinApp的msdn描述
- MSDN中API函数CreateFile的错误信息的描述不正确哦
- MSDN里关于WinMain的描述
- 091020(星期二)MFC线程消息循环3,GetMessage函数msdn描述
- 091011(星期天)MFC的程序入口
- 091021(星期三)MFC线程消息循环4,Using Messages and Message Queues的msdn描述
- 有关FileUpload类的描述和简单实例(来自msdn技术资源库)
- 利用low-level API构建的几种DBus工作流程(转)
- javaScript小技巧集
- 判断素数的算法
- 为何要学编程?如何学编程?用什么语言最好?有什么好书?
- Widget我姗姗来迟
- 091101(星期天)OnNotify函数的msdn描述
- preparedstatement与statement之间的区别与联系
- 冷寂
- Windows 常用命令(Win+R)
- 【我所认知的BIOS】-->Spin Loop
- 从excel读数据到informix的Found a quote for which there is no matching quote错误
- Widget化时代,个性化信息定制时代(1)
- HDU 1701 ACMer
- Android 入门前言之 --布局