
WM_RBUTTONDOWN
The WM_RBUTTONDOWN message is posted when the user presses the right mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
当用户在窗口的客户区域点击鼠标右键时WM_RBUTTONDOWN将被投递(到窗口消息队列).如果鼠标未被捕捉,消息将被投递到获取光标的窗口(即光标所在的那个窗口).否则,消息将投递到捕捉到鼠标的窗口.
WM_RBUTTONDOWN
fwKeys = wParam; // key flags 键位标记
xPos = LOWORD(lParam); // horizontal position of cursor光标水平位置
yPos = HIWORD(lParam); // vertical position of cursor 光标垂直位置
Parameters
参数
- fwKeys
- Value of wParam. Indicates whether various virtual keys are down. This parameter can be any combination of the following values:
- wParam参数的值.指出是否多种虚拟键按下.这个参数可以是以下任意值的组合.
| Value | Description |
|---|---|
| MK_CONTROL | Set if the ctrl key is down. |
| MK_LBUTTON | Set if the left mouse button is down. |
| MK_MBUTTON | Set if the middle mouse button is down. |
| MK_RBUTTON | Set if the right mouse button is down. |
| MK_SHIFT | Set if the shift key is down. |
| Value | Description |
|---|---|
| MK_CONTROL | 设置Ctrl键是否按下 |
| MK_LBUTTON | 设置鼠标左键是否按下 |
| MK_MBUTTON | 设置鼠标中键是否按下 |
| MK_RBUTTON | 设置鼠标右键是否按下 |
| MK_SHIFT | 设置换档键是否按下 |
- xPos
- Value of the low-order word of lParam. Specifies the x-coordinate of the cursor. The coordinate is relative to the upper left corner of the client area.
- lParam的低位值.指出光标的X坐标.坐标相对于窗户区的左上角.
- yPos
- Value of the high-order word of lParam. Specifies the y-coordinate of the cursor. The coordinate is relative to the upper left corner of the client area.
- lParam的高位值.指出光标的Y坐标.窗口左上角开始的坐标系.(Y坐标自上而下增加)
Return Values
返回值
If an application processes this message, it should return zero.
如果程序处理此消息,它应该返回0.
Remarks
附记
An application can use the MAKEPOINTS macro to convert the lParam parameter to a POINTS structure.
程序可以使用MAKEPOINTS宏将lParam参数转换为POINTS结构.
QuickInfo
快速信息
Windows NT: Requires version 3.1 or later.需要3.1以上版本
Windows: Requires Windows 95 or later.需要Win95以上
Windows CE: Unsupported.不支持
Header: Declared in winuser.h.头文件:在winuser.h中声明
See Also
Mouse Input Overview, Mouse Input Messages, GetCapture, MAKEPOINTS, POINTS, SetCapture, WM_RBUTTONDBLCLK, WM_RBUTTONUP

