Sign in to follow this  
liuweili

How to Stop Windows from updating mouse position automatically

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this