Changing Text Line Spacing using Windows API
Posted on 2004-11-08
I am currently programming in delphi and drawing text on a Canvas using the DrawText windows API.
The method can draw text and wrap it inside a specified Rectangle. The problem is that I can't modify the
vertical spacing between lines once the text wraps. anyone knows how? Thanks in advance!
Here's my code:
TEXT = 'The quick brown fox jumped over the sly lazy dog.';
Flags : integer;
MyRect : TRect;
Flags := DT_WORDBREAK;
MyRect := Rect(0,0,20,20);
DrawText(Image1.Canvas.Handle, PChar(TEXT), Length(TEXT), MyRect, Flags);