How to calculate the max size of a font to be all in a tSay

How to calculate the max size of a font to be all in a tSay

Postby AHF » Mon Dec 01, 2008 10:14 am

How can I calculate the max size of a font based on the size of a string to be all visible in a Tsay object ?

Antonio
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Text-Width

Postby ukoenig » Mon Dec 01, 2008 5:35 pm

Hello AHF,

Code: Select all  Expand view

REDEFINE SAY oSUBDIR  VAR cSUBDIR ID 115 OF oDlg3  UPDATE

hDC := oDlg3:GETDC()
nCharWidth := GettextWidth( hDC, cSUBDIR )
MsgAlert( nCharWidth )
ReleaseDC(hDC)



Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 100 guests