Jump to content
  • Advertisement

Archived

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

jimywang

How to hide the mouse?

This topic is 5390 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 have done a little full screen game using DirectX 8.0.I have a problem with hiding the mouse in the game.Can anyone tell me how to hide the mouse in a Win32 full screen program plz?Thx regards

Share this post


Link to post
Share on other sites
Advertisement
It should be noted that ShowCursor does somthing like ''Reference Coutning'' in that if, you call ShowCursor(FALSE); 2 times
then call ShowCursor(TRUE); once it wont show the cursor.

in order to get an effect you must show as many times as you hide, so what i do is make a function that makes reference to variable.

m_cursorvisible=true;//set to true as default

void ShowCursor(bool show)
{
if(show)
{
if(!m_cursorvisible)
{
ShowCursor(TRUE);
m_cursorvisible=true;
}
}
else
{
if(m_cursorvisible)
{
ShowCursor(FALSE);
m_cursorvisible=false;
}
}
}

this will keep everything synced apropriatly.

of course the counting mechanisim is helpful if you have some weird nesting calls to the ShowCursor function, wherein you only want a change at the begining and end of the matched nest.


Raymond Jacobs,

www.EDIGames.com

www.EtherealDarkness.com

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!