Jump to content
  • Advertisement
Sign in to follow this  
ajm113

Hide Mouse Only "In" Window? (Win32/C++)

This topic is 3750 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

How can I hide the mouse if it's in side of the window then the window's boarders? So the user can see where the mouse is if the user is trying too close the window or minimize it from it's boarders?

Share this post


Link to post
Share on other sites
Advertisement
Use ShowCursor. Call it during WM_SETCURSOR, but check the hit area for HTCLIENT.

Only if the hit area code is HTCLIENT you can hide the cursor, in all other cases show it. This way the mouse arrow is visible on the border and caption of the window.

Note that ShowCursor keeps track of the number of calls, so you need to make sure you only call ShowCursor once per hide/show.

Share this post


Link to post
Share on other sites
Can you maybe post a source code or something a bit more so I know what too do? Sorry I'm a Win32 Rookie!

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!