How do I get unintrusive mouse capture on win32 c++?
How can I have a background app in windows that knows the position or movement of the mouse without interfering with normal mousework and without the mouse being over the window?
It depends on how often you need the mouse position. GetCursorPos will return the current cursor position, even if your application doesn''t have the focus. The downside is that you''ll have to continually call it to get updated mouse position information.
You might be able to use DirectInput with nonexclusive access, or install a Windows hook using SetWindowsHookEx. A hook of type WH_MOUSE will allow you to monitor mouse messages. The latter appears a lot easier.
You might be able to use DirectInput with nonexclusive access, or install a Windows hook using SetWindowsHookEx. A hook of type WH_MOUSE will allow you to monitor mouse messages. The latter appears a lot easier.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement