Silverfrost Forums

Welcome to our forums

Display errors on Microsoft Surface Laptop

29 Nov 2019 4:36 #24730

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

29 Nov 2019 6:57 #24731

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

30 Nov 2019 7:20 #24732

See also item number 369 in cwplus.enh.

30 Nov 2019 11:16 #24733

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??

30 Nov 2019 1:09 #24734

%bb is an alternative to %bt that might have a different size.

30 Nov 2019 2:03 #24735

%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.

1 Dec 2019 7:55 #24736

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...

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
1 Dec 2019 11:31 #24737

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

Please login to reply.