   Can't restore full screen mode when minimized
  Hi,I've just plunged into the world of DirectX and encountered my first problem.Right now I'm going through the tutorials at DirectXTutorial.com and I have a problem with the one dealing with full screen mode.It works well but if I minimize my application (e.g. Alt + Tab) and try to bring it up again it won't restore the full screen mode (and I don't like this behaviour).I was wondering if someone knows how to solve this problem? Any help would be great.Greetings,Bay-Breeze   
Quote:Original post by Bay-BreezeRight now I'm going through the tutorials at DirectXTutorial.com and I have a problem with the one dealing with full screen mode.It works well but if I minimize my application (e.g. Alt + Tab) and try to bring it up again it won't restore the full screen mode (and I don't like this behaviour).I was wondering if someone knows how to solve this problem? Any help would be great.What currently happens when you bring the window up again?It sounds to me like you're not keeping your D3DPRESENT_PARAMETERS struct around, so you're Reset()ing the device with different parameters, causing the device to be reset into windowed mode.Time for a shameless plug for my own D3D base code, which unlike DirectXTutorial.com, checks return values properly, and doesn't assume the graphics card can do things.   ;  Thanks for your reply!Yes, when I try to bring up the window I see it in windowed mode but without any content.I'm not exactly sure how to keep the D3DPRESENT_PARAMETERS. Since I'm really new to D3D I'm not getting it from your code.Could you describe what I need to do?   ;Quote:Original post by Bay-BreezeThanks for your reply!Yes, when I try to bring up the window I see it in windowed mode but without any content.I'm not exactly sure how to keep the D3DPRESENT_PARAMETERS. Since I'm really new to D3D I'm not getting it from your code.Could you describe what I need to do?When you create or reset the device, you need to fill in a D3DPRESENT_PARAMETERS struct, which contains the settings for the device. The best thing to do (IMO) is to keep that struct around in the same scope as your device pointer (as a member variable usually, or a global if you have your device pointer as a global). That way you just need to fill in the struct once at startup, and then pass it unmodified to Reset().When you want to change to fullscreen mode, you just change the Windowed member of the same structure, and call Reset(), so the next time your device gets reset, it'll use the last parameters you set up.That's a bit of a rubbish explanation, sorry [smile]. If you take a look at my code, you'll see that the D3DPRESENT_PARAMETERS struct is a member variable that's filled in once at startup, and then used to Reset() the device.   ;  OK, I think I understood what you meant. I will try to integrate it into my code. Thanks for your help.   