Application Scaling

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Application Scaling

#1 Post by rdonnay »

I received this email this morning:
Hello Roger,
Alaska has sent an email today where wo found a point of interest.
"DPI-Aware applications"

> With Top-Down 8.0 we can easily create fully DPI-Aware applications
> without modifications to source code. It is handled automatically at
> startup through Top-Down's extended Application Scaling system.

Would you please inform us if there are already such helpul features in EXPRESS 19 and we did not get aware of it, or if it is intended to include this in the future.

Thanks for information about this.

Regards
Hubert Thaler
Thaler EDV Systeme
Herrnhausplatz 9
A-6230 Brixlegg
Tel .+43 (0) 5337 63431 oder +43 (0) 5338 8888 Fax +43 (0) 5337 63431 88
mailto: hubert.thaleredv@aon.at
This is disconcerting for the following reasons:

1. A long-time eXpress++ user was not aware that eXpress++ has supported application scaling for more than 4 years. This was shown at the Berlin Devcon. We even talked about how eXpress++ has this feature and TopDown does not.

2. Apparently, Alaska Software is sending out emails about TopDown.
The eXpress train is coming - and it has more cars.

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: Application Scaling

#2 Post by Cliff Wiernik »

Yes, it seems that TopDown announcements do come through Alaska. I think it is a part of their developer program. It has happened before. I think Alaska would do the same for Express++.

As for the DPI aware. I know Express++ has had application scaling for some time and so has TopDown. What this release of TopDown is supposed to do in terms of added functionality to scaling is detect when the users goes into advanced properties and changes the scaling of fonts to they are I think they are 120 dpi (125% of normal) instead of standard at 96dpi.

I don't currently use the Express++ automatic scaling and if a user does make that change, the Dialog headings, saysize, getsize fields no longer fit properly as they are larger than I anticipate. Since I don't use the automatic scaling yet, I don't know what actually happens with Express++ in this special case of scaling. This is what is the big addition to Version 8 of TopDown.

User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Application Scaling

#3 Post by Tom »

Cliff is right at both points. ;) Automatic scaling and DPI-awareness are not the same, but they fit together. DPI-awareness in our case means something like automatically changing a selected font from "Arial.12" to "Arial.10" if 120 dpi is used instead of 96 (what we all use at design time, as I think). I don't know what Clayton does exactly, but this might be one solution. Another one would be to scale all coordinates and sizes (factor 1,25 if 120 dpi selected), but this would turn the app into a much bigger one - and the screen size stays the same with a higher dpi value!

What I do now: All font names (!) used anyware reside in a function. DPI settings are retrieved at app start (using "GetDeviceCaps" from GDI32.DLL). If the DPI settings are different to 96, the font names in the function change, like from "12.Arial" to "10.Arial" (it should be something like "9.6.Arial", but that font size doesn't exist). So, looking for "12.Arial" returns "10.Arial" now. Upscaled with the DPI change, it's "12.Arial" anyway (compared to 96 dpi), but the application design still fits. Disadvantage: Whatever the user changes, the application looks the same. :D (That caused some funny talks at our support desk.)
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: Application Scaling

#4 Post by Auge_Ohr »

Tom wrote:(it should be something like "9.6.Arial", but that font size doesn't exist)
IMHO Windows CreateFont API does work with 1/10 so 9.6 is 96 Pixel
http://msdn.microsoft.com/en-us/library ... 85%29.aspx

while modern System use TrueType fonts and ClearType antialiasing you can scale those Font without using "Fontmapper" which try to find "best match"

there was a Thread about GraQueryTextBox()

public.xbase++.generic
re:Graphic printing
Günter Beyes

with Attachment GraTest.ZIP which include

Code: Select all

FUNCTION HandleFromFont( oFont )
how to use it with Xbase++.

so you can "create" those Font but what about "change" ?
as i understood Pablo you can´t ... just destroy and create new
this meen you have to repaint all .. to much if just 1 Pixel change ...

if you want to do this you need a lot of GFK Power ... or spezial ot4xb Code i saw on Devcon to "zoom"
greetings by OHR
Jimmy

Post Reply