关于wm_setcursor

「已注销」 2015-06-10 01:48:10
msdn上关于它的解释:
The WM_SETCURSOR message is sent to a window if the mouse causes the cursor to move within a window and mouse input is not captured.

the mouse causes the cursor to move within a window:这个好理解,就是鼠标引发光标在窗口内的移动。
mouse input is not captures:??这个not capture是什么意思。
写了dialog测试,然后重载onsetcursor(),但是鼠标一进入窗口,就进入调试代码,没法判断not capture。
请了解的人详细说一下。谢谢了。
...全文
221 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
赵4老师 2015-07-10
  • 打赏
  • 举报
回复
WM_SETCURSOR The WM_SETCURSOR message is sent to a window if the mouse causes the cursor to move within a window and mouse input is not captured. WM_SETCURSOR hwnd = (HWND) wParam; // handle to window with cursor nHittest = LOWORD(lParam); // hit-test code wMouseMsg = HIWORD(lParam); // mouse-message identifier Parameters hwnd Value of wParam. Handle to the window that contains the cursor. nHittest Value of the low-order word of lParam. Specifies the hit-test code. wMouseMsg Value of the high-order word of lParam. Specifies the identifier of the mouse message. Default Action The DefWindowProc function passes the WM_SETCURSOR message to a parent window before processing. If the parent window returns TRUE, further processing is halted. Passing the message to a window's parent window gives the parent window control over the cursor's setting in a child window. The DefWindowProc function also uses this message to set the cursor to an arrow if it is not in the client area, or to the registered class cursor if it is in the client area. If the low-order word of the lParam parameter is HTERROR and the high-order word of lParam specifies that one of the mouse buttons is pressed, DefWindowProc calls the MessageBeep function. Remarks The high-order word of lParam is zero when the window enters menu mode. QuickInfo Windows NT: Requires version 3.1 or later. Windows: Requires Windows 95 or later. Windows CE: Unsupported. Header: Declared in winuser.h. See Also Cursors Overview, Cursor Messages, DefWindowProc,MessageBeep
向立天 2015-07-10
  • 打赏
  • 举报
回复
您好 我是本版版主 此帖已多日无人关注 请您及时结帖 如您认为问题没有解决可按无满意结帖处理 另外本版设置了疑难问题汇总帖 并已在版面置顶 相关规定其帖子中有说明 您可以根据规定提交您帖子的链接 如您目前不想结帖只需回帖说明 我们会删除此结帖通知 见此回复三日内无回应 我们将强制结帖 相关规定详见界面界面版关于版主结帖工作的具体办法
Eleven 2015-06-10
  • 打赏
  • 举报
回复
SetCapture()

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧