Jump to content
  • Advertisement
Sign in to follow this  

ShowCursor(FALSE) failing

This topic is 4739 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 know ShowCursor isn't a DirectX api call, but I think DirectX is to blame so I'm asking here: My call to ShowCursor(FALSE); is not hiding the cursor for some reason. Could it be because I'm using DirectInput in my app? (i am ONLY using DirectInput for the keyboard though, so I dunno... also using DirectDraw, but if that causes the problem, then *cough cough* hehe). Anyone know what could cause this to happen? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
DirectInput doesn't make a difference to the cursor.
Are you only using DirectDraw? Cause ShowCursor comes from the IDirect3DDevice9 interface. I can get my cursor to disappear on my game and it's using DirectInput for just the keyboard right now.

Share this post


Link to post
Share on other sites
actually DirectInput can make a difference to the cursor if you're setting up a mouse device with the cooperative level flagged with DISCL_FOREGROUND|DISCL_EXCLUSIVE. But in such a case, the mouse cursor simply disapears, so I guess you could use those flags if you don't want it.

Don't forget that ShowCursor simply increments or decrements a number somewhere, so try this in your application loop:

while (ShowCursor(false) > 0);

In case you called ShowCursor(true) twice or something.

Share this post


Link to post
Share on other sites
Quote:
Original post by Lee_
actually DirectInput can make a difference to the cursor if you're setting up a mouse device with the cooperative level flagged with DISCL_FOREGROUND|DISCL_EXCLUSIVE. But in such a case, the mouse cursor simply disapears, so I guess you could use those flags if you don't want it.

Don't forget that ShowCursor simply increments or decrements a number somewhere, so try this in your application loop:

while (ShowCursor(false) > 0);

In case you called ShowCursor(true) twice or something.


Thanks, I'll try out your advice. I thought of the number not being '1' thing, but I don't actually call ShowCursor(true) anywhere else in my app... Oh well hehe I'll give it a shot, thanks again.

Share this post


Link to post
Share on other sites
Good point. But in his case, he wasn't using it, so not a big deal. But thank you. Nice to know that little piece of info for later programming projects.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!