Sign in to follow this  
Galaximo

Mouse hidden but still can click 'X'

Recommended Posts

I'm using C# to make a Managed DirectX game. My problem is even though I have hidden the mouse, using Cursor.Hide, if while in the game i move the mouse towards the top left or top right corner it clicks on the little icons and exits the game. I looked into restricting the mouse to the window area, but couldn't find a way. Any ideas? Thanks

Share this post


Link to post
Share on other sites
I'm not sure about C#, but the process should be similar for C++. In C++ you can just handle WM_CLOSE messages in your window procedure, and tell Windows not to close your window if you're not ready (E.g. you're in game rather than at the main menu).

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