forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

wrong screen resolution in clearwin+ under win8.1
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
Chemie



Joined: 07 Mar 2015
Posts: 49

PostPosted: Mon Mar 09, 2015 7:24 pm    Post subject: wrong screen resolution in clearwin+ under win8.1 Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7923
Location: Salford, UK

PostPosted: Mon Mar 09, 2015 8:32 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
dfwlms



Joined: 04 Jan 2005
Posts: 20
Location: Huntsville, Alabama

PostPosted: Mon Mar 09, 2015 8:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Mon Mar 09, 2015 9:37 pm    Post subject: Reply with quote

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

Eddie
Back to top
View user's profile Send private message
Chemie



Joined: 07 Mar 2015
Posts: 49

PostPosted: Mon Mar 09, 2015 11:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7923
Location: Salford, UK

PostPosted: Mon Mar 09, 2015 11:56 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Chemie



Joined: 07 Mar 2015
Posts: 49

PostPosted: Tue Mar 10, 2015 3:22 am    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7923
Location: Salford, UK

PostPosted: Tue Mar 10, 2015 8:58 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Wilfried Linder



Joined: 14 Nov 2007
Posts: 314
Location: Düsseldorf, Germany

PostPosted: Tue Mar 10, 2015 10:44 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Tue Mar 10, 2015 2:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2814
Location: South Pole, Antarctica

PostPosted: Tue Mar 10, 2015 3:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
Chemie



Joined: 07 Mar 2015
Posts: 49

PostPosted: Tue Mar 10, 2015 3:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Tue Mar 10, 2015 3:59 pm    Post subject: Reply with quote

The posts that roused no interest were:

DPI awareness
and
Logical screen DPI

Eddie
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7923
Location: Salford, UK

PostPosted: Tue Mar 10, 2015 7:34 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Chemie



Joined: 07 Mar 2015
Posts: 49

PostPosted: Tue Mar 10, 2015 11:08 pm    Post subject: Reply with quote

paul,

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

Chemie
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group