Jump to content
  • Advertisement


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


Problems with ShowCursor Function

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

Hi, i''ve implemented a mouse rotation look-at function in my application, which allowes a rotation of the view by hold the right mouse button down. All is implemented with the WinAPI functions and works fine. Now i try to hide the mouse cursor during the rotation, and show it in normal look-at mode for object picking. The problem is, that the ShowCursor(bool) Function has no effect when i call her before i start the rotation-Thread. I can always see the cursor, why ??? I call the function in the WM_RBUTTONDOWN routine to hide the cursor and again in WM_RBUTTONUP to show it. I can''t understand why it isn''t hide during the time i hold the button down ... When i try to call the ShowCursor-function in the render-Funcion of my application, using a global flag for the bool-value, the cursor only hides after several movements....

Share this post

Link to post
Share on other sites
I solved the problem...

The failure was that i''ve increment the mousecounter flag with ShowCursor(TRUE) in the init-routine of my Application (default value is Zero).

By calling this function i''ve got an int-index of 1, the ShowCursor function hides the cursor only on an index <0, so that i must have a double call of ShowCursor(FALSE) to decrement the value to -1 or delete the ShowCursor call in the init-routine ...

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.

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!