Jump to content
  • Advertisement
Sign in to follow this  

Toggle Fullscreen

This topic is 4313 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
I'm sure the samples that come in the SDK show it, though sometimes they're not exactly clear.

You need to use SetWindowLong to change the window style. You need to use SetWindowPos, with the flag SWP_FRAMECHANGED, to make the style changes take effect.

You change your D3D presentation parameters to include the new backbuffer size you want (ClientRect of window, or resolution of full screen mode), set windowed to true or false, and do a Reset on your D3D device, passing the new presentation parameters in.

Share this post


Link to post
Share on other sites
In addition to what the person above me said, you will lose all your resources like textures, buffers and the like. I'm not sure if you knew this already, but toggling between fullscreen and windowed acts as your device has been lost, so you need to release your resources and load them again.

Share this post


Link to post
Share on other sites
Thank you, i now that. I make a reset when i resize the window. it works well but when i want to toggle into fullscreen the program closes the window. I need a tutorial. That one i found isn`t good.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!