Silverfrost Forums

Welcome to our forums

wrong screen resolution in clearwin+ under win8.1

9 Mar 2015 6:24 #15847

Hello,

I'm using the personal edition of ftn95 and now I have a Notebook with win 8.1 and a display resolution of 3200 x 1800. When I ask the screenresolution with clearwin_info@('SCREEN_WIDTH') and clearwin_info@('SCREEN_HEIGTH'), I get the values 1280 x 720. How can I get the right values?

Thank you for your response.

9 Mar 2015 7:32 #15850

Are you sure that the display resolution is 3200 x 1800? That seems very high.

Here are two equivalent ways to get the resolution...

program main
include <windows.ins>
integer m1,m2
m1 = GetSystemMetrics(SM_CXSCREEN)
m2 = ClearWin_Info@('SCREEN_WIDTH')
print*, m1,m2
m1 = GetSystemMetrics(SM_CYSCREEN)
m2 = ClearWin_Info@('SCREEN_DEPTH')
print*, m1,m2
end
9 Mar 2015 7:37 #15851

Chemie,

When I use the following commands with my 1920 x 1080 screen (Windows 7), I get the correct values.

nHpix_screen =clearwin_info@('SCREEN_WIDTH') nVpix_screen =clearwin_info@('SCREEN_DEPTH')

Note that I use the word 'depth' instead of 'height'. My FTN95 version (5.5.0.0) is pretty old, and maybe that's why the word 'depth' is required

9 Mar 2015 8:37 #15853

Paul, It is astonishing, isn't it. But I did an internet search and found several, including Dell M3800

Eddie

9 Mar 2015 10:23 #15855

dfwlms, your right, I also have used depth.

paul, I definitly use 3200 x 1800 pixel, its a asus zenbook ux 305. I have tried other resolutions, but the result is not to understand:

uses resoltution result 3200 x 1800 1280 x 720 2560 x 1600 1280 x 800 2048 x 1536 1024 x 768 . 1920 x 1440 960 x 720 1920 x 1200 1280 x 800 1920 x 1080 1280 x 720 .

the only corect values are: 1280 x 800 1280 x 768 1152 x 804 and 1024 x 768

On my desktop I use 1920 x 1200, the vlues are there correct.

I don't know, is tis a problem of clearwin+ ore of the graphic driver of my notebook.

Thanks

9 Mar 2015 10:56 #15857

The call to GetSystemMetrics does not use ClearWin+. It accesses the Microsoft function of this name directly. So the problem does not appear to be in ClearWin+ (I am assuming that, if you run my program above then, like me, you get the equal values for m1 and m2 on the two printed lines).

10 Mar 2015 2:22 #15860

paul,

you are right, the values for m1 and m2 are always equal, independent of the resolution. When this is not a problem of clearwin+, but which part is responsible for the wrong values?

Thanks

10 Mar 2015 7:58 #15861

I am guessing that the answer lies in the DIP setting for the display.

Here is a link...

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

You will need to copy the whole link manually. The URL parenthesis in this editor does not work for this link.

10 Mar 2015 9:44 #15862

Paul,

for links including brackets exists a simple workaround: Just replace ...

[ by %5B ] by %5D ( by %28 ) by %29

Example:

https://msdn.microsoft.com/en-us/library/windows/desktop/dn469266%28v=vs.85%29.aspx

Wilfried

10 Mar 2015 1:04 #15863

Ah! The link is briliant. I have been wittering on about dpi settings for years, often getting no reply at all for a post, and this explains where Microsoft have been heading. But I haven't got further than Windows 7, and 8/8.1 have made additional strides.

You may (or may not!) find some of my postings on the subject of dpi that are helpful.

I first came across this in XP, with a relatively high resolution laptop, and it needed different layouts when the dpi setting was high. Windows 7 lies about its resolution for some dpi settings and does scaling itself. It does mess with Clearwin!

Eddie

10 Mar 2015 2:16 #15865

This was first time i encountered DPI issue. Before everything showed exactly the same res as the screen, usually 1920 by 1200 or 1080. I checked today and the tablet with native 3200x1800 showed 2300x1200 and anything up and down depending on DPI

10 Mar 2015 2:23 #15866

Paul,

thank you for the link. Now, I need more time to read and understand all.

When I use a %gr-Window and I resize it to full screen, I get back with clearwin_info@('GRAPHICS_WIDTH') and clearwin_info@('GRAPHICS_DEPTH') the values 3000 x 1600.

I think, these are the correct values. Perhaps, I can correct my program due to these values.

Many thanks

Chemie

10 Mar 2015 2:59 #15868

The posts that roused no interest were:

DPI awareness and Logical screen DPI

Eddie

10 Mar 2015 6:34 #15870

If GRAPHICS_WIDTH and GRAPHICS_DEPTH give the required values then there may be a direct way to get this information via a call to GetClientRect or GetWindowRect using the HWND of the desktop.

10 Mar 2015 10:08 #15871

paul,

sorry, GetClientRect gives the same wrong values of 1280 x 720, when the display has 3200 x 1800 pixel.

Chemie

22 Mar 2015 9:58 #15940

Hello,

and only for information:

the problem depends only by my notebook, perhaps due to the intel driver.

At my desktopcomputer, I have now a 4k Monitor and a 4k grafikcard. clearwin_info@(screen_width) and clearwin_info@(screen_depth) gives the corect values of 3840 x 2160.

Chemie

Please login to reply.