draw.h - format flags

Format flags

DT_TOP

Justify the text to the top of the rectangle (default).

DT_LEFT

Align text left (default).

DT_CENTRE, DT_CENTER

Centre text horizontally in the rectangle.

DT_RIGHT

Align text right.

DT_VCENTER, DT_VCENTRE

Centre text vertically. DT_SINGLELINE must also be specified.

DT_BOTTOM

Justify the text to the bottom of the rectangle. DT_SINGLELINE must also be specified.

DT_WORDBREAK

Breaks words. Lines are automatically broken between words if a word would extend past the edge of the rectangle . A carriage return-line feed sequence also breaks the line. If this flag is not specified, output is on one line.

DT_SINGLELINE

Display text on a single line only. Carriage returns and line feeds do not break the line.

DT_EXPANDTABS

Expands tab characters. The default number of characters per tab is eight. The DT_WORD_ELLIPSIS, DT_PATH_ELLIPSIS, and DT_END_ELLIPSIS values cannot be used with DT_EXPANDTABS.

DT_TABSTOP

Set tab stops. Bits 0xff00 define the characters for each tab. The default number of characters per tab is eight. DT_CALCRECT, DT_EXTERNALLEADING, DT_INTERNAL, DT_NOCLIP, and DT_NOPREFIX cannot be used with DT_TABSTOP.

DT_NOCLIP

Draw without clipping (faster).

DT_EXTERNALLEADING

Include the font external leading in line height.

DT_CALCRECT

Auto expand rectangle to fit text if necessary.

DT_NOPREFIX

Turn off processing of prefix characters. Normally, DrawFormattedText() interprets the mnemonic-prefix character & as a directive to underscore the character that follows, and the mnemonic-prefix characters && as a directive to print a single &. By specifying DT_NOPREFIX, this processing is turned off.

DT_INTERNAL

Use the system font to calculate text metrics.

DT_EDITCONTROL

Duplicate the characteristics of a multi-line edit control. Specifically, the average character width is calculated in the same manner as for an edit control, and the function does not display a partially visible last line.

DT_PATH_ELLIPSIS

Replace characters in the middle of the text with ellipses (… ) so that the result fits in the specified rectangle. If the string contains backslash (\) characters, DT_PATH_ELLIPSIS preserves as much as possible of the text after the last backslash.

DT_END_ELLIPSIS

If the end of the text does not fit in the rectangle, truncate and add ellipses (…).

DT_RTLREADING

Right-to-left reading order for bi-directional text when the font is Hebrew or Arabic.

DT_WORD_ELLIPSIS

Truncate any word that does not fit in the rectangle and adds ellipses (…).

Format flags for the DrawFormattedText() function.

See the MSDN Library documentation on the DrawText function for further information.


RELATED TOPICS

Drawing operations