Windows CE .NET

This structure contains information specific to an NM_CUSTOMDRAW message that a ToolTip control sends.

typedef struct tagNMTTCUSTOMDRAW {
  UINT uDrawFlags;


NMCUSTOMDRAW structure that contains general information for custom drawing.
Unsigned integer that specifies how to format the ToolTip text when the ToolTip displays the text. An application can change the value of this member to alter the way that the ToolTip draws text. This value is passed to the DrawText function internally. The following table shows the possible values, which you can combine.
Value Description
DT_BOTTOM Justifies the text to the bottom of the rectangle. You must combine this value with DT_SINGLELINE.
DT_CALCRECT Determines the width and height of the rectangle. If the ToolTip contains 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 ToolTip contains only one line of text, DrawText modifies the right side of the rectangle so that the right side bounds the last character in the line. In either case, DrawText returns the height of the formatted text but does not draw the text.

Before sending an NM_CUSTOMDRAW message, an application must set the right and bottom members of the RECT structure pointed to by lpRect. The internal call to DrawText updates these members.

DT_CENTER Centers text horizontally in the rectangle.
DT_EXPANDTABS Expands tab characters. The default number of characters per tab is eight.
DT_INTERNAL Uses the system font to calculate text metrics.
DT_LEFT Aligns text to the left.
DT_NOCLIP Draws without clipping. DrawText is somewhat faster when DT_NOCLIP is used.
DT_NOPREFIX Turns off processing of prefix characters. Normally, DrawText interprets the mnemonic-prefix character (&) as a directive to underscore the character that follows and two mnemonic-prefix characters (&&) as a directive to print a single ampersand (&). Specifying DT_NOPREFIX turns this processing off.
DT_RIGHT Aligns text to the right.
DT_SINGLELINE Displays text on a single line only. Carriage returns and linefeeds do not break the line.
DT_TABSTOP Sets tab stops. Bits 8-15, which make up the high-order byte of the low-order word, of the uFormat parameter of the DrawText function specify the number of characters for each tab. The default number of characters per tab is eight. You cannot use the DT_CALCRECT, DT_EXTERNALLEADING, DT_INTERNAL, DT_NOCLIP, and DT_NOPREFIX values with the DT_TABSTOP value.
DT_TOP Top-justifies text. You must combine this value with DT_SINGLELINE.
DT_VCENTER Centers text vertically. You must combine this value with DT_SINGLELINE.
DT_WORDBREAK Breaks words. DrawText automatically breaks lines between words if a word would extend past the edge of the rectangle specified by the lpRect parameter. A carriage return/linefeed sequence also breaks the line.


OS Versions: Windows CE .NET 4.0 and later.
Header: Commctrl.h.

See Also


Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.