Jump to content
  • Advertisement
Sign in to follow this  
RidiculousX

How to center a window (Windows)?

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

So I've made a splash screen but it's not centered. I need to center it. I was thinking of using SetWindowPos() with the SWP_NOSIZE flag to change its position, but I need to know the current display resolution. If someone could point me to a way to find the resolution or maybe an easier way altogether, that would be great. I've searched the Platform SDK documentation and looked on MSDN and Googled this problem, but didn't come up with anything (maybe I just suck at constructing a good search queary). Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
Search MSDN for GetSystemMetrics(), I think that is what you are looking for.

Edit: Too late :)

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!