music7611 Posted August 10, 2004 Posted August 10, 2004 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 I'm 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. Quote
Administrators PlausiblyDamp Posted August 10, 2004 Administrators Posted August 10, 2004 (edited) may not be the answer you were after but this link on msdn gives the answer of 'you don't'. 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 - it's 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. Edited August 10, 2004 by PlausiblyDamp Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
music7611 Posted August 10, 2004 Author Posted August 10, 2004 In the 4th Monkey Island game, it doesn't let you minimize. And when I try to minimize these programs, they don't maxamize again, or they look all funky. It can't be impossible, I probably have to overload some message, but which one? :confused: Quote
Administrators PlausiblyDamp Posted August 10, 2004 Administrators Posted August 10, 2004 The second link in my post gives a possible solution - haven't tried it myself though and I doubt it will work on all OSs either. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
music7611 Posted August 10, 2004 Author Posted August 10, 2004 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) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.