Archived

This topic is now archived and is closed to further replies.

dreddlox

How do I get unintrusive mouse capture on win32 c++?

Recommended Posts

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.

Share this post


Link to post
Share on other sites