Jump to content
  • Advertisement
Sign in to follow this  
Timptation

Full screen in Windows programming

This topic is 3672 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

I'm making a DirectX game and have my presentation parameters set so that it is in fullscreen (d3dPP.Windowed = false;), so I think my problem is with my Windows code. I tried setting the CreateWindow function to place the window at 0,0 and screen width/height, but the window border's title bar keeps trying to pop back in for a flickering effect. Sooooo: 1) Can I disable the border or set fullscreen mode a better way? 2) Also, is there a way to grab screen width/height from Windows so I don't have to hardcode it?

Share this post


Link to post
Share on other sites
Advertisement
I'm not a fullscreen expert so I can't really help with part 1, but I do know the answer to part 2. GetSystemMetrics with an arguement of either SM_CXSCREEN or SM_CYSCREEN will give you either the x or y dimensions, respectively.

Share this post


Link to post
Share on other sites
Quote:
Original post by Timptation
I'm making a DirectX game and have my presentation parameters set so that it is in fullscreen (d3dPP.Windowed = false;), so I think my problem is with my Windows code. I tried setting the CreateWindow function to place the window at 0,0 and screen width/height, but the window border's title bar keeps trying to pop back in for a flickering effect. Sooooo:

1) Can I disable the border or set fullscreen mode a better way?

2) Also, is there a way to grab screen width/height from Windows so I don't have to hardcode it?
1. You should use WS_POPUP instead of WS_OVERLAPPEDWINDOW as your window style.

2. IDirect3D9::GetAdapterDisplayMode is the Direct3D way of doing it, as it'll give you the pixel format for the monitor too, and will work with multiple monitors (Where GetSystemMetrics will give you the resolution for all monitors, not just one, which is what D3D wants).

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!