DrawTextW Function

Virtual Tree View

Paint support procedure.

Pascal
procedure DrawTextW(DC: HDC; lpString: PWideChar; nCount: Integer; var lpRect: TRect; uFormat: Cardinal; AdjustRight: Boolean);
Description

This procedure implements a subset of Window's DrawText API for Unicode which is not available for Windows 95, 98 and ME. For a description of the parameters see DrawText in the online help. 

 

Supported flags are currently: 

 

  • DT_LEFT
  • DT_TOP
  • DT_CALCRECT
  • DT_NOCLIP
  • DT_RTLREADING
  • DT_SINGLELINE
  • DT_VCENTER

 

Differences to the DrawTextW Windows API: 

The additional parameter AdjustRight determines whether to adjust the right border of the given rectangle to accomodate the largest line in the text. It has only a meaning if also DT_CALCRECT is specified.

Notes

When running on any NT windows version (Windows NT 4.0, Windows 2000., Windows XP and up) the native windows API is used 

instead of this method as it also supports word wrapping properly.

Group
File

VirtualTrees

Links
What do you think about this topic? Send feedback!