SetWindowsHookEx for WH_MOUSE

耗尽温柔 提交于 2019-11-27 09:19:52
// here I put WH_MOUSE instead of WH_MOUSE_LL
hMouseHook = SetWindowsHookEx( WH_MOUSE_LL, mouseProc, hInstance, NULL );

Fourth param must also be changed to GetCurrentThreadId() to make it local.

rogerdpack

since you have a "main" in there, my guess is that you'd need to make it into a dll for it to work for messages other than the *_LL type

Understanding the low-level mouse and keyboard hook (win32)

http://developer-resource.blogspot.com/2008/07/setwindowshookex-example.html has a dll example

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!