[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'InterfaceBase' (#lcl)

TWidgetSet.DrawText

Draws formatted text within a rectangle.

Declaration

Source position: winapih.inc line 85

public function TWidgetSet.DrawText(

  DC: HDC;

  Str: PChar;

  Count: Integer;

  var Rect: TRect;

  Flags: Cardinal

):Integer; virtual;

Arguments

Str

  

The text (should be zero terminated).

Count

  

The number of (Wide)Chars in the text.

Rect

  

The bounding (clipping) rectangle.

Flags

  

Various flags.

Function result

The height of the drawn text, from Rect.Top to the bottom of the text. Zero on failure.

Description

Several formatting options are available (DT_WORDBREAK...).

DT_CALCRECT suppresses all painting, instead the extent of the formatted text is returned in the Rect parameter.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.