Sign in to follow this  
dan_dande

mouse control in window

Recommended Posts

hi I'm working on a strategy game in D3D 9 & C++, I want to run in window mode (like Sims series), so I should use a big window (which almost takes all of the screen space in 1024x768), I want it to run always in this mode, but how can I manage mouse that it doesn't hurt me when I go outside of game window, for example I want to run a program from start menu, how can I switch mouse between game window and Windows environment? please help me with your suggestions, thanks

Share this post


Link to post
Share on other sites
You can simply anacquire the mouse to release your application's control over it and then try to re-acquire it once you need it again. When you're doing this is up to you though. You might try to check for the window's edges to see if the mouse pointer is about to leave the window and then unacquire it. Or you might trigger it to the activation / inactivation of the window itself or maybe to a certain keystroke ... Whatever suits your needs and preferences.

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