FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to get the Font size for TGet?
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
How to get the Font size for TGet?
Posted: Fri Dec 21, 2007 02:41 PM

Dear All,

I would like to set TGet length (Pixel) match with Font Size?

Because the user can define Font Size, the Variable digit set by user.

How can I get it?

Regards,
Dutch

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 312
Joined: Sat Oct 08, 2005 09:12 AM
How to get the Font size for TGet?
Posted: Fri Dec 21, 2007 03:03 PM
Dutch,

this is a rather difficult procedure.
Unlike to MS DOS console programs with their fix font size for each letter and digit in Windows you must be aware of proportional width of characters.

To be sure you could take n times to width of the biggest character, i think it's a 'W'.
This value you can get from
GetTextWidth( <hDC>, <cString>, [<hFont>] )  --> <nPixelWidth>
May be that could help you.

Best regards,
Detlef

Continue the discussion