View previous topic :: View next topic |
Author |
Message |
dpannhorst
Joined: 29 Aug 2005 Posts: 165 Location: Berlin, Germany
|
Posted: Fri Nov 29, 2019 5:36 pm Post subject: Display errors on Microsoft Surface Laptop |
|
|
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 |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2393 Location: Yateley, Hants, UK
|
Posted: Fri Nov 29, 2019 7:57 pm Post subject: |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8019 Location: Salford, UK
|
Posted: Sat Nov 30, 2019 8:20 am Post subject: |
|
|
See also item number 369 in cwplus.enh. |
|
Back to top |
|
|
dpannhorst
Joined: 29 Aug 2005 Posts: 165 Location: Berlin, Germany
|
Posted: Sat Nov 30, 2019 12:16 pm Post subject: |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8019 Location: Salford, UK
|
Posted: Sat Nov 30, 2019 2:09 pm Post subject: |
|
|
%bb is an alternative to %bt that might have a different size. |
|
Back to top |
|
|
dpannhorst
Joined: 29 Aug 2005 Posts: 165 Location: Berlin, Germany
|
Posted: Sat Nov 30, 2019 3:03 pm Post subject: |
|
|
%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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8019 Location: Salford, UK
|
Posted: Sun Dec 01, 2019 8:55 am Post subject: |
|
|
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 |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2393 Location: Yateley, Hants, UK
|
Posted: Sun Dec 01, 2019 12:31 pm Post subject: |
|
|
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 |
|
|
|