Jump to content
  • Advertisement
Sign in to follow this  
liuweili

How to Stop Windows from updating mouse position automatically

This topic is 4581 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

I recently need a special mouse behavior. When mouse moves, the cursor should not act as the default windows behavior. For example, when moving mouse left, the cursor actually circles clockwise. The problem is that using SetCursorPos makes the mouse cursor flicking. It's because the default cursor position is different with the new position I set. I need the default windows cursor and cannot implement an owner-draw cursor using GDI or something else for some reasons. I'm not sure if it is possible to stop the windows cursor from updating automatically.

Share this post


Link to post
Share on other sites
Advertisement
I'm not sure if this is a possibility for you, but could you use hide the cursor (using ShowCursor(FALSE)) and then draw your own cursor in the correct spot?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
How about using BOOL ClipCursor( const RECT *pRect ) ?

Share this post


Link to post
Share on other sites
Yes, by setting a low-level mouse hook. Check out SetWindowsHookEx with WH_MOUSE_LL. That ought to do the trick.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!