Windows 10 Upgrade and Screen Resolution

Discussions related to graphics (2D and 3D), animation and games programming
kittertonics
Posts: 3
Joined: Sun 27 May 2018, 10:06

Windows 10 Upgrade and Screen Resolution

Post by kittertonics »

Apologies if this has been asked elsewhere. I have just been required by work to upgrade from Windows 7 to Windows 10. When doing this, I have found that the screen resolution for graphics seems to have changed. I am using 1920 x 1080 and running code in full screen mode. I have a whole load of programmes that create graphics but the Y-scale now seems to have reduced messing up all of my code. If I use the code below I get values for xscreen% = 3072 but yscreen% = 1728 which is less than I used to get. I am pretty sure I did not have 1920 x 1440 resolution prior to upgrade, but I guess this is a possibility, even though it is not available now. Just wondered if anyone else has noticed this problem?

"SYS "GetSystemMetrics", 0 TO xscreen%"
"SYS "GetSystemMetrics", 1 TO yscreen%"
"SYS "SetWindowLong", @hwnd%, -16, &16000000"
"1SYS "SetWindowPos", @hwnd%, -1, 0, 0, xscreen%, yscreen%, 0"

Thanks.
DDRM

Re: Windows 10 Upgrade and Screen Resolution

Post by DDRM »

(On a Windows 10 system) GetSystemMetrics returns 1920 x 1080 for me, as expected, which is the resolution of my primary monitor.

That suggests to me that you have a very high res monitor: I wonder if Windows is mapping it down to give a higher "magnification", and that that might have changed between Windows 7 and 10? It might decide that it can't sensibly map 1728 to 1080, and so gone for something else?

As an aside, I assume you are aware of the (normal) limitation of the graphics window to 1920 x 1440, and are making suitable allowances for that, if you are setting your window to full screen on a very hi res monitor?

Hope that's helpful - I dare say Richard will let me know if I'm talking complete nonsense, which is quite possible...

Best wishes,

D
DDRM

Re: Windows 10 Upgrade and Screen Resolution

Post by DDRM »

Richard did supply additional detail:

> I dare say Richard will let me know if I'm talking complete nonsense, > which is quite possible...

Not nonsense at all, but if his (native) 3072 x 1728 display was previously reporting 1920 x 1080 to BB4W, as it seems it was, it implies that Windows' 'High DPI Scaling' has changed between Windows 7 and Windows 10. I don't know why that would have happened, but to restore the original behaviour I expect he will need to change the scaling setting of his PC.

To do that in Windows 10 right-click on the desktop, in the context menu displayed select Display Settings, then ensure that the 'Change the size of text, apps and other items' value is set to 160%.

If it doesn't offer 160% as a selection, click on the Advanced scaling settings link and enter 160 in the 'Enter a custom scaling size' box.
With 160% scaling 3072 should scale down to 1920 and 1728 to 1080, as he was getting in Windows 7.

Note that enabling High DPI Scaling is generally helpful when running BB4W because it will usually avoid exceeding the 1920 x 1440 (default) limit, however high the native display resolution is.

Hope that's useful.

D