Problems with ShowCursor Function
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....
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 ...
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 ...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement