Jump to content
  • Advertisement

Archived

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

dreddlox

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

This topic is 5708 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!