Window not minimized when press Alt-Tab & Alt-Ctrl-Del keys...
by Raja John · in Torque Game Builder · 01/22/2009 (5:22 am) · 2 replies
I am developing a commercial game for portals, in my game while press ALT-TAB keys the game window not minimized while in Windowed Mode & Full Screen, it also continue while pressing ALT-CTRL-DEL keys.
I have TGB 1.7.4. & VC++ 2008 Express
The QA report from portals for game is below...
1. Launch the game (XP & VISTA).
2. Once in-game, press ctrl+alt+delete and select Task Manager.
3. Notice that you will be brought back to the desktop for a few seconds and won't be able to control mouse movement. They, the game will automatically be brought back into focus.
How can i solve this?
In keybinding my code is
Thanks.
I have TGB 1.7.4. & VC++ 2008 Express
The QA report from portals for game is below...
1. Launch the game (XP & VISTA).
2. Once in-game, press ctrl+alt+delete and select Task Manager.
3. Notice that you will be brought back to the desktop for a few seconds and won't be able to control mouse movement. They, the game will automatically be brought back into focus.
How can i solve this?
In keybinding my code is
moveMap.bind("keyboard", "escape", "onWindowFocusChange");is this wrong? if wrong where could i modify the coding to minimize the game window while it is not focused?Thanks.
About the author
#2
Every TGB game I tried handled the ctrl-alt-del screen wrong. I tried a lot of other non-TGB games and most of them do it properly: If cancel is pressed in the ctrl-alt-del screen the game is reactivated, and if the task manager is started they return to the desktop.
So has anyone found any good solition for this problem or anyone know the proper way of dealing with the ctrl-alt-del screen?
05/27/2009 (5:59 am)
We are seeing the problem with ctrl-alt-del and task manager too, have only tried it on Vista so far though, and one of the portals won't sell our game if we don't fix this problem. From debugging the source-code it does seem the window is being minimzed, at least the code for it is called in the source, but for some reason the window still gets activated again after starting the task manager from the ctrl-alt-del screen. I have tried changing the z-order of the window but didn't change anything. Are the window handling being ignored when the ctrl-alt-del screen is being shown? If I ignore the WM_ACTIVATEAPP message on return from that screen, the screen continues to use the game resolution on the desktop. So that would mean the call to change the resolution back to the desktop resolution doesn't have any effect when the ctrl-alt del screen is shown.Every TGB game I tried handled the ctrl-alt-del screen wrong. I tried a lot of other non-TGB games and most of them do it properly: If cancel is pressed in the ctrl-alt-del screen the game is reactivated, and if the task manager is started they return to the desktop.
So has anyone found any good solition for this problem or anyone know the proper way of dealing with the ctrl-alt-del screen?
Torque Owner Ehrlich
function onWindowFocusChange(%isFocused) { if(!%isFocused) { if (!isObject(escena)) return; if ($isOpenIGM) return; if(escena.type !$= "menu") inGameMenu(); return; else return; } else return; }above, you can read a simple function that will help you pause the game when the windows focus has changed... it lacks polish but i think you get the idea.
you could tweak that code a lil, so you can minimize the window or something when focus is lost...