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 

Display errors on Microsoft Surface Laptop

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
dpannhorst



Joined: 29 Aug 2005
Posts: 165
Location: Berlin, Germany

PostPosted: Fri Nov 29, 2019 5:36 pm    Post subject: Display errors on Microsoft Surface Laptop Reply with quote

I have developped a program using much elements of Clearwin like buttons, list boxes an text boxes.
This programs works very well on a lot of PCs.
Now I have tried this program on a Microsoft Surface Laptop and I get astonishing results in the appearance of the Clearwin outputs. Buttons are much larger than normal, list boxes to small an text output clipped at the end of the text. Tab positions differ from the PC solution.

Does anyone have the same experience?

Is there any solution for these problems?

Detlef Pannhorst
Back to top
View user's profile Send private message Visit poster's website
LitusSaxonicum



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

PostPosted: Fri Nov 29, 2019 7:57 pm    Post subject: Reply with quote

Detlef,

It's a matter of being 'large dpi aware'. Unfortunately, large dpi settings (which make high resolution displays work for you) are not automatically handled by CW+. Some elements are handled by giving them the same numbers of pixels, and other elements are handled as a function of the average character cell size. The solution is to (a) determine the dpi setting in use, and (b) which version of Windows is being used, then display your windows scaled accordingly.

I am by no means an expert, and first encountered the issue with an Acer laptop with a 1680x1050 display, and I am still learning.

It has been an awareness that the Surface is likely to display this behaviour that stopped me buying one - well, that and the price!

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


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

PostPosted: Sat Nov 30, 2019 8:20 am    Post subject: Reply with quote

See also item number 369 in cwplus.enh.
Back to top
View user's profile Send private message
dpannhorst



Joined: 29 Aug 2005
Posts: 165
Location: Berlin, Germany

PostPosted: Sat Nov 30, 2019 12:16 pm    Post subject: Reply with quote

I have already done some workarounds to get a "good look" for my output boxes, but all buttons (%bt) look very large in comparison to the rest of the box content. I see no possibility to influence the size of the button??
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Sat Nov 30, 2019 2:09 pm    Post subject: Reply with quote

%bb is an alternative to %bt that might have a different size.
Back to top
View user's profile Send private message
dpannhorst



Joined: 29 Aug 2005
Posts: 165
Location: Berlin, Germany

PostPosted: Sat Nov 30, 2019 3:03 pm    Post subject: Reply with quote

%bb makes no difference in the size to %bt.

I think there are some problems inside Clearwin.

Also %tl, %tb and %rs have other behaviour in the appearance on the screen.
Back to top
View user's profile Send private message Visit poster's website
John-Silver



Joined: 30 Jul 2013
Posts: 1235
Location: Aerospace Valley

PostPosted: Sun Dec 01, 2019 7:52 am    Post subject: Reply with quote

This problem raises the ever difficult question for anyone, be it user-programmer or developer, that of QA.
Not only regarding software working correctly but also windows operating system difficulties and , as here, the vagaries of hardware.

You can only do so much 'lateral thinking' to anticipate and cater for these things philosophically. So glithe ar inevitable.

Paul,
what sort of range of 'machines' do Silverfrost check-out new versions on (I assume you have a standard set of verification programs you run) before releasing a new version ?

Also, .enh item #369 says:

Quote:
This means that, where possible, ClearWin+ now makes the call "SetProcessDpiAwareness(Process_System_DPI_Aware)" in its initialisation process. Programmers who need to use values other than Process_System_DPI_Aware (which has the value 1)


what does 'where possible' mean ?

then

Quote:
NB. The Windows API function SetProcessDpiAwareness is only effective on its first call so a call to SetDpiAwareness@ must be placed before any other calls to the ClearWin+ library.


I find this a bit confusing.
If it's only effective on it's only first call, doesn't that mean it's effective for the whole program ?
So, if for example one has on of these new-fangles win v. 8.1 thru 10.n installed SetProcessDpiAwareness is initially set to '1', i.e. for the whole 'process' (i.. program?)
What's the point in that if you have to use then make a call to SetDpiAwareness@ before 'other' calls to Clearwin+ library ?

Also does 'other' mean that it has to be called before every call to a Clearwin+ library function or just the once before the first call ?

If it's called in the 'installation process' presumeably it could detect the OS present, and determine whether there are 1 or more monitors, and then make the appropriate selection (not just the default assuming it's a win8.1 or above syatem) out of the 3 available without depending on the user having to do it ?

Windows 7 does not have the DPI awareness features, then what's the point of having the option to '0' ?
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sun Dec 01, 2019 8:55 am    Post subject: Reply with quote

Detlef

I would try different DPI settings on the laptop first.

Then, is it a commercial application or just for your own use?

Is it a main program or just one or more small dialogs?

For small dialogs you might be able do something with %wi (or the older %di). There are videos for %wi on Youtube. These allow you to fix the sizes and positions of the controls in so-called "dialog units". This is the raw Windows API way of doing things.

There is a new and undocumented format code %LO (for location) that will be available in the next release. This will allow you to set the position and size of each control in dialog units. Here is a simple example of how it will work...

Code:
WINAPP
PROGRAM design1
INTEGER iw
CHARACTER*1000 buffer
   buffer = ' '
   iw = winio@('%`lo&',-1,-1,144,144)    !Size of dialog 
   iw = winio@('%re&',buffer)
   iw = winio@('%lo&',13,7,108,88)     
   iw = winio@('%bb[OK]&')
   iw = winio@('%lo&',13,102,48,11)     
   iw = winio@('%bb[Cancel]&')
   iw = winio@('%lo',73,102,48,11)     
END
Back to top
View user's profile Send private message
LitusSaxonicum



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

PostPosted: Sun Dec 01, 2019 12:31 pm    Post subject: Reply with quote

John (Silver),

Although Windows 7 may not have the dpi-awareness feature, it certainly does have different dpi settings. In fact, I think they are much more 'elastic' than in later versions of Windows.

In fact, the whole dpi thing is a lousy way of coping with hi-res displays.

Eddie
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1235
Location: Aerospace Valley

PostPosted: Wed Dec 04, 2019 8:44 pm    Post subject: Reply with quote

Paul wrote:
Quote:

This will allow you to set the position and size of each control in dialog units.


what are 'dialog' units ...you mean the size and position in pixels relative to the top lft corner of th dialog ?
(so you mean individual dialog refrence system, the units being pixels ?)
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1235
Location: Aerospace Valley

PostPosted: Wed Dec 04, 2019 9:05 pm    Post subject: Reply with quote

Paul,
I remember being mesmerised by the swish %wi format code video you produced, th effort you put into getting out in the shop window, and it's potential, but was put off testing it in earnest at the time by the caveat:-
Quote:
%wi cannot be used with a MDI %fr - MDI Frame and is unlikely to be useful if the window can be resized at runtime
.

I was also a little nervous about the transition between UI developd using this obviously powerful facility and integrating it with other non-%wi code in an 'undo' faashion. Ir wasn't clear how tht might work in practice.

Disappointingly, I don't recall much discussion on the forums since then concerning it's use so I guess folk are still low on the uptake., or that it's 'squeaky clean' in the bug depržartment.

Since you mention also the 'new' %lo feature would I be right in assuming that you've been putting some significant effort into expanding/robustifying (is that a word ?) %wi's features and it's potential over recent months and that, since we're now into december, is it the reason for the slight delay relative to usual in the next release of the next robust dll's?
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
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
Page 1 of 1

 
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