Archived

This topic is now archived and is closed to further replies.

Kaellaar

DirectX Problem

Recommended Posts

Can anyone explain to me what needs to be done to make a DirectX program restore correctly after being minimized? All of the SDK examples do it correctly, but I can''t figure out what part of the code does this. Thanks. Kaellaar

Share this post


Link to post
Share on other sites
Just a few things.

If you''re using DirectX 7 just call
llpdirectdraw7->RestoreAllSurfaces();

it''s new to version 7 and is a great shortcut.

And another thing, by restoring the surfaces, it doesn''t restore the contents of them, it merely "re-grabs" the memory where the surface will reside. It''s not likely, but possible that the surfaces will be written over. You will need to load all of your graphics back onto the surfaces after restoring them just to be sure though.

Share this post


Link to post
Share on other sites