Jump to content
  • Advertisement

Archived

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

Ignoring ALT-TAB, windows key, etc...

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

I''m using DirectInput for mouse/keyboard, OpenGL for rendering. My problem is, if my app is running in windowed mode and you either: click the mouse outside the window, press alt-tab, or actually anything that just makes the window lose focus, the app quits out. I''d like to be able to decide if I want to ignore the event (in the case of alt-tab), or handle it in my own way (in the case of lost focus) instead of just immediately quitting. My guess is this has something to do with the PeekMessage event and picking out the proper message. Can anyone help me out? Or perhaps there''s some source code somewhere that I could look at. Thanks =)

Share this post


Link to post
Share on other sites
Advertisement
There are ways to stop alt-tab working, however, i don''t recommend it at all. Instead; lookup the following windows messages:
WM_ACTIVATE
WM_SIZE

And process them to track changes to the program becoming activated/minimised/etc.... Also, keep in mind that you should attempt to process errors such as DIERR_INPUTLOST (with DirectInput) anyway, as CTRL-ALT-DEL can sometimes be very annoying.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!