Unicode Controls & Classes for VB6 - Version 4

clsCommonWrapper.eCtlDrawTextFormat Enum

Used when drawing text, check MSDN for details

Name Value Description
CTL_DT_BOTTOM &H8 Justifies the text to the bottom of the rectangle. This value is used only with the DT_SINGLELINE value.
CTL_DT_CALCRECT &H400 Determines the width and height of the rectangle. If there are multiple lines of text, DrawText uses the width of the rectangle pointed to by the lpRect parameter and extends the base of the rectangle to bound the last line of text. If the largest word is wider than the rectangle, the width is expanded. If the text is less than the width of the rectangle, the width is reduced. If there is only one line of text, DrawText modifies the right side of the rectangle so that it bounds the last character in the line. In either case, DrawText returns the height of the formatted text but does not draw the text.
CTL_DT_CENTER &H1 Centers text horizontally in the rectangle.
CTL_DT_EXPANDTABS &H40 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 the DT_EXPANDTABS value.
CTL_DT_EXTERNALLEADING &H200 Includes the font external leading in line height. Normally, external leading is not included in the height of a line of text.
CTL_DT_INTERNAL &H1000 Uses the system font to calculate text metrics.
CTL_DT_LEFT &H0 Aligns text to the left.
CTL_DT_NOCLIP &H100 Draws without clipping. DrawText is somewhat faster when DT_NOCLIP is used.
CTL_DT_NOPREFIX &H800 Turns off processing of prefix characters. Normally, DrawText 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. For example,
input string: "A&bc&&d"
normal: "Abc&d"
DT_NOPREFIX: "A&bc&&d"
CTL_DT_RIGHT &H2 Aligns text to the right.
CTL_DT_SINGLELINE &H20 Displays text on a single line only. Carriage returns and line feeds do not break the line.
CTL_DT_TABSTOP &H80 Sets tab stops. Bits 15-8 (high-order byte of the low-order word) of the uFormat parameter specify the number of characters for each tab. The default number of characters per tab is eight. The DT_CALCRECT, DT_EXTERNALLEADING, DT_INTERNAL, DT_NOCLIP, and DT_NOPREFIX values cannot be used with the DT_TABSTOP value.
CTL_DT_TOP &H0 Justifies the text to the top of the rectangle.
CTL_DT_VCENTER &H4 Centers text vertically. This value is used only with the DT_SINGLELINE value.
CTL_DT_WORDBREAK &H10 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.
CTL_DT_EDITCONTROL &H2000& Duplicates the text-displaying characteristics of a multiline 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.
CTL_DT_PATH_ELLIPSIS &H4000& 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, DT_PATH_ELLIPSIS preserves as much as possible of the text after the last backslash.
The string is not modified unless the DT_MODIFYSTRING flag is specified.
CTL_DT_END_ELLIPSIS &H8000& 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.
The string is not modified unless the DT_MODIFYSTRING flag is specified.
CTL_DT_MODIFYSTRING &H10000 Modifies the specified string to match the displayed text. This value has no effect unless DT_END_ELLIPSIS or DT_PATH_ELLIPSIS is specified.
CTL_DT_RTLREADING &H20000 Layout in right-to-left reading order for bidirectional text when the font selected into the hdc is a Hebrew or Arabic font. The default reading order for all text is left-to-right.
CTL_DT_WORD_ELLIPSIS &H40000 Truncates any word that does not fit in the rectangle and adds ellipses.