Sign in to follow this  
bobason456

Hide Mouser Cursor

Recommended Posts

bobason456    156
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
inferno82    152
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
microdot    324
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
bobason456    156
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
microdot    324
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

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