Jump to content
  • Advertisement
Sign in to follow this  
dpadam450

CreateWindow limiting to 2560x1440

This topic is 913 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 notice today when putting my game in 4K things were far off center, I finally stripped my code down to realizing CreateWindow is doing something that I'm not sure why. If my desktop resolution is 3840x2160 and I call CreateWindow(2558, 1439), then my window reaches the edge of my monitor minus 1 pixel. Obviously it shouldn't come close to the edge of the screen.

 

So I assume this is a dpi issue, I'll keep looking though.

Edited by dpadam450

Share this post


Link to post
Share on other sites
Advertisement

I turned my dpi scaling down to 100% from 150% in system settings and things adjusted according, now how do I deal with this when windows dpi scaling is on?

Share this post


Link to post
Share on other sites

When you say start with that, to create the window do I just need to call SetProcessDPIAware()? I already tried the visual studio setting for DPI Aware in the manifest both true and false and that didn't work. SetProcessDPIAware() is still making my window the same way incorrectly.

 

I also launched the exe outside of visual studio and that didn't do anything either.

Edited by dpadam450

Share this post


Link to post
Share on other sites

Are you single-mon or multi-mon? If multi-mon, are all monitors at the same scaling? This page has a lot of detail:

https://msdn.microsoft.com/en-us/library/windows/desktop/dn469266(v=vs.85).aspx

Apparently they want you to use the app manifest, but you said you already did that. Also try disabling scaling on just your app from Windows properties and running it:

https://technet.microsoft.com/en-us/library/dn528847.aspx

If that works, then your DPI awareness declaration isn't taking hold, for whatever reason.

Share this post


Link to post
Share on other sites

I found right-clicking on my exe and chaning compatibility dpi settings worked. I noticed BF4 has this as well. I think that is the solution.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!