Jump to content
  • Advertisement
Sign in to follow this  
Kiristu

Locking mouse on one screen [solved]

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

Hi, I'm developing a DirectX full-screen application. I want to avoid that the mouse leaves the primary screen on dual-screen configuration. I tried to use the WM_MOUSELEAVE event to force the mouse position at application edges when the mouse goes out, but it is not satisfactory, as I can see the cursor being "caught back" to the main screen. Also, this make impossible to ALT-TAB/minimize the application. Any idea ? Thanks, K.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Kiristu
Also, this make impossible to ALT-TAB/minimize the application.
Why on earth do you want to do this? There's always ways around this (Ctrl+alt+del anyone?) and you're just going to annoy the hell out of the user.

Share this post


Link to post
Share on other sites
I don't want to prevent alt+tab etc !
This was a side effect of my first try with WM_MOUSELEAVE.

ClipCursor works perfectly.

Share this post


Link to post
Share on other sites
Quote:
Original post by Kiristu
I don't want to prevent alt+tab etc !
This was a side effect of my first try with WM_MOUSELEAVE.

ClipCursor works perfectly.
Whoops, I need to learn to read better [smile]

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.

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!