constants DrawTextFormatEnum
The DrawTextFormatEnum type specifies the flags to draw a text. The DrawTextFormatEnum type supports the following flags:

NameValueDescription
exTextAlignTop0 Justifies the text to the top of the rectangle
exTextAlignLeft0 Aligns text to the left
exTextAlignCenter1 Centers text horizontally in the rectangle
exTextAlignRight2 Aligns text to the right
exTextAlignVCenter4 Centers text vertically
exTextAlignBottom8 Justifies the text to the bottom of the rectangle
exTextAlignMask15 Specifies the mask for text's alignment
exTextWordBreak16 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-line feed sequence also breaks the line. If this is not specified, output is on one line.
exTextSingleLine32 Displays text on a single line only. Carriage returns and line feeds do not break the line.
exTextExpandTabs64 Expands tab characters. The default number of characters per tab is eight.
exPlainText128 Treats the text as plain text
exTextNoClip256 Draws without clipping
exHTMLTextNoColors512 Ignores the <fgcolor> and <bgcolor> tags
exTextCalcRect1024 Determines the width and height of the text
exHTMLTextNoTags2048 Ignores all HTML tags
exTextPathEllipsis16384 For displayed text, replaces characters in the middle of the string with ellipses so that the result fits in the specified rectangle. If the string contains backslash (\) characters, exTextPathEllipsis preserves as much as possible of the text after the last backslash.
exTextEndEllipsis32768 For displayed text, if the end of a string does not fit in the rectangle, it is truncated and ellipses are added. If a word that is not at the end of the string goes beyond the limits of the rectangle, it is truncated without ellipses.
exTextWordEllipsis262144 Truncates any word that does not fit in the rectangle and adds ellipses.