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
How to get the Font size for TGet?
- Detlef Hoefner
- Posts: 312
- Joined: Sat Oct 08, 2005 9:12 am
- Location: Germany
- Contact:
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 fromMay be that could help you.
Best regards,
Detlef
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
Code: Select all
GetTextWidth( <hDC>, <cString>, [<hFont>] ) --> <nPixelWidth>
Best regards,
Detlef