• Advertisement
Sign in to follow this  

Hide Mouser Cursor

This topic is 4567 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'm using the NeHe base code.. When windowed I can use ShowCursor(FALSE); to hide the Cursor, but when in Full screen mode this function has no effect. Has any one else noticed this, found a solution?

Share this post


Link to post
Share on other sites
Advertisement
I have not seen any problems like this. The effect of the ShowCursor() during fullscreen mode is to eliminate the cursor. Are you saying that the cursor is still there during fullscreen mode? If that is the case, then maybe you are not using ShowCursor() in the correct place.

[Edited by - inferno82 on July 19, 2005 7:31:43 AM]

Share this post


Link to post
Share on other sites
Check the return value. There's a display counter for the cursor and the cursor won't be hidden until the counter is zero. ShowCursor only increments and decrements that counter.

This might work better than simply calling ShowCursor.

while ( ShowCursor ( FALSE ) > 0 ) ;

edit:
Alternatively, if you're never going to need to the cursor or you plan on rendering your own (using OpenGL for example) you could create your window with an transparent cursor.

[Edited by - microdot on July 19, 2005 7:38:06 AM]

Share this post


Link to post
Share on other sites
Thansk, I've not yet tried your advice... but I use the cursor to select things in the window.. When the user holds the middle mouse button I hide the mouse and do rotations. When they lift the mouse button I show the mouse again. It's all fine when the display is windowed but not full screen.

Share this post


Link to post
Share on other sites
I see. Here's another alternative you could try.

// this goes at the beginning of the window procedure.
static HCURSOR cursor_handle = 0 ;

// when the button is pressed
cursor_handle = SetCursor ( 0 ) ;

// when the button is released
SetCursor ( cursor_handle ) ;

Share this post


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

  • Advertisement