Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

  • Administrators
Posted (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 by PlausiblyDamp

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted
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:
Posted

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)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...