Stop Distractions for Program

music7611

Active member
Joined
Jan 24, 2004
Messages
35
I am writing a windows program that uses the Windows API (no MFC, no .NET, just windows). Anywho, it is a program that uses DirectDraw. When you minimize a DirectDraw program, all the surfaces get messed up and Im to far in the project to fix this. I need to find a way to stop the program from minimizing from Alt+Tab, another program popping, a screen saver, or whatever. Can anyone help me?

Thanks.
 
may not be the answer you were after but this link on msdn gives the answer of you dont.

however this one gives you a way of doing it (also a MSDN link ;))
Not sure if there is a 100% guarenteed way of doing it across all OSs though...

Just as an aside I personally have a low opinion of software that either disables alt+tab - its my PC and if I want to alt+tab I probably have a good reason, who are you to tell me otherwise, or fails to handle it correctly. If you are doing and DirectX / Direct3D stuff then you should really have some resource management routines within your app - all you would need to do is handle the loss of focus, unload the resources and pause the app state. On regaining focus simply reload the resources and un-pause the state.
 
Last edited by a moderator:
In the 4th Monkey Island game, it doesnt let you minimize. And when I try to minimize these programs, they dont maxamize again, or they look all funky. It cant be impossible, I probably have to overload some message, but which one? :confused:
 
Sorry, when I first tried it, it was one really long and weird link.

That helps a lot, but also, when another application opens something, my program is minimized, is someway to stop this too? (i.e. Norton is scanning your computer, windows is trying to make you download updates)
 
Back
Top