Jump to content
  • Advertisement
Sign in to follow this  
ehmdjii

DX11 Getting notified when fullscreen mode is interrupted

This topic is 1816 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 use DX11 to bring my game into an exclusive fullscreen mode.

 

i want to handle the events, when the fullscreen mode is interrupted by the OS. like when alt+tab is pressed, or ctrl+alt+del.

 

is there an event on the Window or the WindowHandle where i can subscribe to?

Share this post


Link to post
Share on other sites
Advertisement

In your windows message loop, you can listen for events of type "WM_ACTIVATE" and "wParam == WA_INACTIVE".

See the msn documentation for details.

 

This will solve only part of your problem though, because it won't work for all the possible cases:

  • For alt-tab and windows-key, you will receive a WM_ACTIVATE event.
  • For ctrl+alt+del and lock screen (windows-key + L) you will not receive an event.

 

So, if you really want to catch all possible cases where your fullscreen mode is interrupted, you have to do what Medo3337 pointed out:

In regular time intervals, actively check the state of your window and/or your display device. This might seem inconvenient, but I have found no better way.

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!