Is there anyway to determine the exact width of a line of text that is to be displayed in a dialog box?
I guess it could be in Dialog units or Pixels cos I can convert it but so far all the methods i have read and tried in Poffs are not exact.
bu& = GetDialogBaseUnits()
UnitW = CLNG(LOWRD(bu&)) ' get width of system font
UnitH = CLNG(HIWRD(bu&)) ' get height of system font
returns 8 as the "average" system font width. I had to dive that by 2 !!! to get anything close to a real world number.
Obviously I takes lee space than W. so is it possible to go through the string to be displayed and calculate a sum in pixel i guess, of all the letters that is dead nuts accurate?
------------------
Kind Regards
Mike
I guess it could be in Dialog units or Pixels cos I can convert it but so far all the methods i have read and tried in Poffs are not exact.
bu& = GetDialogBaseUnits()
UnitW = CLNG(LOWRD(bu&)) ' get width of system font
UnitH = CLNG(HIWRD(bu&)) ' get height of system font
returns 8 as the "average" system font width. I had to dive that by 2 !!! to get anything close to a real world number.
Obviously I takes lee space than W. so is it possible to go through the string to be displayed and calculate a sum in pixel i guess, of all the letters that is dead nuts accurate?
------------------
Kind Regards
Mike
Comment