OpenGL TaskSwitching

What do I have to do when the user wants to ALT-TAB out of my fullscreen OpenGL application?! My MessageHandler receives a WM_ACTIVATE message, but what tasks do I have to do there for getting TaskSwitching to work?! Simply make the rendercontext “uncurrent”?! Or how do your MessageHandlers look like?

Why dont switch off timer?

Where is the problem?
Under some circumstances I was able to get alt-tab working with no trouble at all, transparently to the app.

Of curse, as Azazel pointed out, getting it work is different from getting it work right. Turning off some timers is undoubtly important for some kind of apps like games.

Also, if you’re using DirectInput, you may need to unacquire / release devices. Possibly the same thing applies to DirectAudio as well.

The problem is the resolution and stuff didn’t work right. I can’t get TaskManager in foreground etc.
I just need to know how to disable OpenGL for the time being.

Originally posted by Sgt. Nukem:
The problem is the resolution and stuff didn’t work right. I can’t get TaskManager in foreground etc.
I just need to know how to disable OpenGL for the time being.

Mh, I wrapped everything in my own API some time ago so take this with a grain of salt, it may be horribly wrong.

1- Get the WM_ACTIVATE message. If I am not wrong, it is sent to the app when ALT-TAB is used.
2- Parse it by restoring previous resolution (save it before switching by using that function which also sets the resolution)
3- Hide the window or iconize it. Don’t ask me how I do that, I don’t remember it!

Depending on window styles, this could take some extra steps.
Sorry to be of little help but so much time has been passed since I faced those problems I don’t remember a single line of code of that. I could try to check it out but I’m plenty of TODOs so this would take quite a while.

This message has been posted mainly for the WM_ACTIVATE thing but you probably already know that.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.