using System; namespace Vanara.PInvoke { /// The formatting options for DrawText. [PInvokeData("Uxtheme.h", MSDNShortId = "bb773199")] [Flags] public enum DrawTextFlags { /// Justifies the text to the top of the rectangle. DT_TOP = 0x00000000, /// Aligns text to the left. DT_LEFT = 0x00000000, /// Centers text horizontally in the rectangle. DT_CENTER = 0x00000001, /// Aligns text to the right. DT_RIGHT = 0x00000002, /// Centers text vertically. This value is used only with the DT_SINGLELINE value. DT_VCENTER = 0x00000004, /// Justifies the text to the bottom of the rectangle. This value is used only with the DT_SINGLELINE value. DT_BOTTOM = 0x00000008, /// /// Breaks words. Lines are automatically broken between words if a word extends past the edge of the rectangle specified by the lprc /// parameter. A carriage return-line feed sequence also breaks the line. /// DT_WORDBREAK = 0x00000010, /// Displays text on a single line only. Carriage returns and line feeds do not break the line. DT_SINGLELINE = 0x00000020, /// Expands tab characters. The default number of characters per tab is eight. DT_EXPANDTABS = 0x00000040, /// /// Sets tab stops. The DRAWTEXTPARAMS structure pointed to by the lpDTParams parameter specifies the number of average character /// widths per tab stop. /// DT_TABSTOP = 0x00000080, /// Draws without clipping. DrawTextEx is somewhat faster when DT_NOCLIP is used. DT_NOCLIP = 0x00000100, /// /// Includes the font external leading in line height. Normally, external leading is not included in the height of a line of text. /// DT_EXTERNALLEADING = 0x00000200, /// /// Determines the width and height of the rectangle. If there are multiple lines of text, DrawTextEx uses the width of the rectangle /// pointed to by the lprc parameter and extends the base of the rectangle to bound the last line of text. If there is only one line /// of text, DrawTextEx modifies the right side of the rectangle so that it bounds the last character in the line. In either case, /// DrawTextEx returns the height of the formatted text, but does not draw the text. /// DT_CALCRECT = 0x00000400, /// /// Turns off processing of prefix characters. Normally, DrawTextEx interprets the ampersand (&) mnemonic-prefix character as a /// directive to underscore the character that follows, and the double-ampersand (&&) mnemonic-prefix characters as a /// directive to print a single ampersand. By specifying DT_NOPREFIX, this processing is turned off. Compare with DT_HIDEPREFIX and DT_PREFIXONLY /// DT_NOPREFIX = 0x00000800, /// Uses the system font to calculate text metrics. DT_INTERNAL = 0x00001000, /// /// 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. /// DT_EDITCONTROL = 0x00002000, /// /// 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. /// DT_PATH_ELLIPSIS = 0x00004000, /// /// For displayed text, replaces the end of a string with ellipses so that the result fits in the specified rectangle. Any word (not /// at the end of the string) that goes beyond the limits of the rectangle is truncated without ellipses. The string is not modified /// unless the DT_MODIFYSTRING flag is specified. /// DT_END_ELLIPSIS = 0x00008000, /// /// Modifies the specified string to match the displayed text. This value has no effect unless DT_END_ELLIPSIS or DT_PATH_ELLIPSIS is specified. /// DT_MODIFYSTRING = 0x00010000, /// /// 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. /// DT_RTLREADING = 0x00020000, /// Truncates any word that does not fit in the rectangle and adds ellipses. DT_WORD_ELLIPSIS = 0x00040000, /// /// Prevents a line break at a DBCS (double-wide character string), so that the line-breaking rule is equivalent to SBCS strings. For /// example, this can be used in Korean windows, for more readability of icon labels. This value has no effect unless DT_WORDBREAK is specified. /// DT_NOFULLWIDTHCHARBREAK = 0x00080000, /// /// Ignores the ampersand (&) prefix character in the text. The letter that follows will not be underlined, but other /// mnemonic-prefix characters are still processed. /// DT_HIDEPREFIX = 0x00100000, /// /// Draws only an underline at the position of the character following the ampersand (&) prefix character. Does not draw any /// character in the string. /// DT_PREFIXONLY = 0x00200000, } }