Board index » delphi » Get clipped text

Get clipped text


2004-09-25 07:46:18 PM
delphi51
Hi
Im using the DrawTextEx function to draw clipped text to a Canvas with
DT_SINGLELINE or DT_END_ELLIPSIS etc .... as the flags
Is there a way to retrieve the actual string that is displayed on the canvas
after the clipping irrespective of the length of the original string ?
Thanks and Regards
 
 

Re:Get clipped text

Mr. X writes:
Quote
Im using the DrawTextEx function to draw clipped text to a Canvas with
DT_SINGLELINE or DT_END_ELLIPSIS etc .... as the flags
Is there a way to retrieve the actual string that is displayed on the
canvas
after the clipping irrespective of the length of the original string ?
Include DT_MODIFYSTRING in your Format parameter. Or inspect the
uiLengthDrawn member of the DrawTextParams parameter.
-Gary