Sign in Join
FPDoc Onlineexperiment

TWidgetSet.DrawText function

Member of TWidgetSetpublicIn unit InterfaceBase

Draws formatted text within a rectangle.

Declaration

pascal
function DrawText(DC: HDC; Str: PChar; Count: Integer; var Rect: TRect; 
 Flags: Cardinal): Integer; virtual

Arguments

DC

Device context for the text rendering operation.

Str

The text (should be zero terminated).

Count

The number of (Wide)Chars in the text.

Rect

The bounding (clipping) rectangle.

Flags

Formatting flags applied in the method.

Function result

The height for the rendered text, calculated from values in Rect. Zero on failure.

Description

Several formatting options are available for use in the Flags argument. The value correspond to the DrawText constants defined in the lcltype.pp unit.

DT_CALCRECT suppresses all painting, and calculates the extent for the formatted text returned in the Rect parameter.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.