Jump to content
  • Advertisement

Archived

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

Cpp

Mouse grab (similar to alt-tab kind of...)

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

Here''s a question. Say i have an OpenGL program running in windowed _or_ fullscreen. In both modes i want my app to "grab" the mouse. This is a must in windowed mode of course. But when i alt-tab or hit the syskey, i want to "let go" of the mouse so it can roam free around my desktop. How do i do this?? And yes, i will most likely have that stupid fullscreen/alt-tab problem that know one can solve it seems. So any other related help would be really appreciated !

Share this post


Link to post
Share on other sites
Advertisement
SetCapture(hWnd) and ReleaseCapture(hWnd). WM_ACTIVATEAPP is sent to the window when it either becomes active or deactive (wParam has the value).

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!