Einzelnen Beitrag anzeigen

Benutzerbild von Gollum
Gollum

Registriert seit: 14. Jan 2003
Ort: Boxberg
456 Beiträge
 
Delphi 10.1 Berlin Professional
 
#3

Re: Text mit Zeilenumbruch auf Bitmap ausgeben

  Alt 16. Okt 2003, 09:26
Hallo,

anstatt DT_CALCRECT würde ich DT_WORDBREAK benutzen.

Zitat:
...
DT_CALCRECT
Determines the width and height of the rectangle. If there are multiple lines of text, DrawText uses the width of the rectangle pointed to by the lpRect parameter and extends the base of the rectangle to bound the last line of text. If there is only one line of text, DrawText modifies the right side of the rectangle so that it bounds the last character in the line. In either case, DrawText returns the height of the formatted text but does not draw the text.
...
DT_WORDBREAK
Breaks words. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by the lpRect parameter. A carriage return-linefeed sequence also breaks the line.
...
  Mit Zitat antworten Zitat