Handling fullscreen Alt-Tab

Started by
2 comments, last by Turold 16 years, 6 months ago
I am implementing graceful fullscreen alt-tab handling for my casual game framework. I have a problem, since I don't know what exactly happens with the window when I alt-tab. I know that window loses focus. Essentially, my question is what should be done with the window to properly restore fullscreen when user clicks minimazed window or alt-tabs back? I know about DX stuff cleanup and reset. I just don't know what should I do with the window. What messages/notifications should I look-up? I checked WM_ACTIVATE and WM_ACTIVATEAPP but it's not what I need. I need to know precisely when user tries to return to the game and how to manipulate window do handle this event.
Advertisement
Hey there, i think it is WM_ACTIVATE..

case WM_ACTIVATE:   if (WA_INACTIVE == _wParam)       setWindowActive(false);   else if (WA_ACTIVE == _wParam)      setWindowActive(true);   else if (WA_CLICKACTIVE == _wParam)      setWindowActive(true);   return 0;


setWindowActive() is a function defined by myself.
Appologises if im wrong :s
You should also know that WM_KILLFOCUS and WM_SETFOCUS are the message that tells you when you have input focus.
Thx, I solved it. WM_ACTIVATE is the key.

This topic is closed to new replies.

Advertisement