View previous topic :: View next topic |
Author |
Message |
Chemie
Joined: 07 Mar 2015 Posts: 49
|
Posted: Mon Mar 09, 2015 7:24 pm Post subject: wrong screen resolution in clearwin+ under win8.1 |
|
|
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. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Mon Mar 09, 2015 8:32 pm Post subject: |
|
|
Are you sure that the display resolution is 3200 x 1800? That seems very high.
Here are two equivalent ways to get the resolution...
Code: | 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 |
|
|
Back to top |
|
|
dfwlms
Joined: 04 Jan 2005 Posts: 20 Location: Huntsville, Alabama
|
Posted: Mon Mar 09, 2015 8:37 pm Post subject: |
|
|
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 _________________ David Williams
Retired Aerospace Engineer
Huntsville, Alabama |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Mon Mar 09, 2015 9:37 pm Post subject: |
|
|
Paul, It is astonishing, isn't it. But I did an internet search and found several, including Dell M3800
Eddie |
|
Back to top |
|
|
Chemie
Joined: 07 Mar 2015 Posts: 49
|
Posted: Mon Mar 09, 2015 11:23 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Mon Mar 09, 2015 11:56 pm Post subject: |
|
|
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). |
|
Back to top |
|
|
Chemie
Joined: 07 Mar 2015 Posts: 49
|
Posted: Tue Mar 10, 2015 3:22 am Post subject: |
|
|
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 |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Tue Mar 10, 2015 8:58 am Post subject: |
|
|
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. |
|
Back to top |
|
|
Wilfried Linder
Joined: 14 Nov 2007 Posts: 314 Location: Düsseldorf, Germany
|
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Tue Mar 10, 2015 2:04 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Tue Mar 10, 2015 3:16 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
Chemie
Joined: 07 Mar 2015 Posts: 49
|
Posted: Tue Mar 10, 2015 3:23 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Tue Mar 10, 2015 3:59 pm Post subject: |
|
|
The posts that roused no interest were:
DPI awareness
and
Logical screen DPI
Eddie |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Tue Mar 10, 2015 7:34 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
Chemie
Joined: 07 Mar 2015 Posts: 49
|
Posted: Tue Mar 10, 2015 11:08 pm Post subject: |
|
|
paul,
sorry, GetClientRect gives the same wrong values of 1280 x 720, when the display has 3200 x 1800 pixel.
Chemie |
|
Back to top |
|
|
|