CreateWindow limiting to 2560x1440

Started by
4 comments, last by dpadam450 7 years, 10 months ago

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.

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

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?

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

You probably want to start by marking your game as DPI aware.

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

SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

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.

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

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.

SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

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.

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

This topic is closed to new replies.

Advertisement