【蹩脚读MSDN】之WM_COMMAND
来源:互联网 发布:行车路线图制作软件 编辑:程序博客网 时间:2024/06/14 06:48
蹩脚读MSDN之WM_COMMAND
The WM_COMMAND message is sent when the user selects a command item from a menu, when a control sends a notification message to its parent window, or when an accelerator keystroke is translated.
当用户从菜单选中一个命令选项或者控件向父窗口发送消息或者接受到一个快捷键信息时会接受到该消息
A window receives this message through its WindowProc function.
窗口的回调函数接受到WM_COMMAND消息
LRESULT CALLBACK WindowProc(
HWND hwnd, // handle to window 窗口句柄
WM_COMMAND, // the message to send
WPARAM wParam, // notification code and identifier
LPARAM lParam // handle to control (HWND)
);
Parameters
wParam
The high-order word specifies the notification code if the message is from a control. If the message is from an accelerator, this value is 1. If the message is from a menu, this value is zero.
如果消息来自一个控件则wparam的高位返回通知码
如果该消息来自快捷键 则wparam的高位返回返回1
如果该消息来自命令菜单 则wparam的高位返回返回0
The low-order word specifies the identifier of the menu item, control, or accelerator.
无论消息是来自控件 快捷键 还是命令菜单 wparam的低位都表示该
控件(快捷键.命令菜单)的ID
lParam
Handle to the control sending the message if the message is from a control. Otherwise, this parameter is NULL.
如果消息来自控件则lparam返回该消息的句柄 否则返回NULL
Return Values
If an application processes this message, it should return zero.
如果应用程序处理此消息时,它应返回零。
- 【蹩脚读MSDN】之WM_COMMAND
- windows message 之WM_COMMAND
- WM_COMMAND
- wm_command
- WM_COMMAND
- WM_COMMAND
- WM_COMMAND
- wm_command
- MSDN之GDI
- MSDN之GDI
- msdn之断点API
- msdn之断言篇
- msdn之CRT调试
- msdn之dll调试
- msdn之调试杂项
- msdn之dll
- msdn之修饰符
- WM_COMMAND & WM_SYSCOMMAND
- c#线程间传递参数
- ASCII,Unicode,UTF-8,GB2312编码之间的关系
- jQuery 源码剖析-4 init 函数分析
- 隐藏和显示图片
- jQuery 源码剖析-5 size,get 函数说明
- 【蹩脚读MSDN】之WM_COMMAND
- Android平台显示单位px和dip以及sp的区别
- jQuery 源码剖析-6 setArray each index 函数说明
- Fedora 12 国内更新源
- Flash 与数学:心动玫瑰线(3)
- JAVA 用ArrayList对对象中某属性排序
- C++ string详解
- 拨乱反正
- 小区能否安装太阳能热水器 谁主沉浮