Original Post
🔒 Locked
Toggle Fullscreen
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.
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.
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.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement