Click to Rate and Give Feedback
MSDN
MSDN Library
User Interface
Windows Controls
Control Library
ToolTip
Structures
 TOOLINFO Structure
TOOLINFO Structure

The TOOLINFO structure contains information about a tool in a ToolTip control.

Syntax

typedef struct tagTOOLINFO{
    UINT      cbSize; 
    UINT      uFlags; 
    HWND      hwnd; 
    UINT_PTR  uId; 
    RECT      rect; 
    HINSTANCE hinst; 
    LPTSTR    lpszText; 
#if (_WIN32_IE >= 0x0300)
    LPARAM lParam;
#endif
#if (_WIN32_WINNT >= 0x0501)
    void *lpReserved;
#endif
} TOOLINFO, NEAR *PTOOLINFO, *LPTOOLINFO;

Members

cbSize
Size of this structure, in bytes. This member must be specified.
uFlags
Flags that control the ToolTip display. This member can be a combination of the following values:
TTF_ABSOLUTE
Version 4.70 and later. Positions the ToolTip window at the same coordinates provided by TTM_TRACKPOSITION. This flag must be used with the TTF_TRACK flag.
TTF_CENTERTIP
Centers the ToolTip window below the tool specified by the uId member.
TTF_IDISHWND
Indicates that the uId member is the window handle to the tool. If this flag is not set, uId is the tool's identifier.
TTF_PARSELINKS
Version 6.0 and later. Indicates that links in the tooltip text should be parsed.

Note that Comctl32.dll version 6 is not redistributable but it is included in Microsoft Windows XP or later. To use Comctl32.dll version 6, specify it in a manifest. For more information on manifests, see Enabling Visual Styles.

TTF_RTLREADING
Indicates that the ToolTip text will be displayed in the opposite direction to the text in the parent window.
TTF_SUBCLASS
Indicates that the ToolTip control should subclass the tool's window to intercept messages, such as WM_MOUSEMOVE. If this flag is not set, you must use the TTM_RELAYEVENT message to forward messages to the ToolTip control. For a list of messages that a ToolTip control processes, see TTM_RELAYEVENT.
TTF_TRACK
Version 4.70 and later. Positions the ToolTip window next to the tool to which it corresponds and moves the window according to coordinates supplied by the TTM_TRACKPOSITION messages. You must activate this type of tool using the TTM_TRACKACTIVATE message.
TTF_TRANSPARENT
Version 4.70 and later. Causes the ToolTip control to forward mouse event messages to the parent window. This is limited to mouse events that occur within the bounds of the ToolTip window.
hwnd
Handle to the window that contains the tool. If lpszText includes the LPSTR_TEXTCALLBACK value, this member identifies the window that receives the TTN_GETDISPINFO notification messages.
uId
Application-defined identifier of the tool. If uFlags includes the TTF_IDISHWND flag, uId must specify the window handle to the tool.
rect
The bounding rectangle coordinates of the tool. The coordinates are relative to the upper-left corner of the client area of the window identified by hwnd. If uFlags includes the TTF_IDISHWND flag, this member is ignored.
hinst
Handle to the instance that contains the string resource for the tool. If lpszText specifies the identifier of a string resource, this member is used.
lpszText
Pointer to the buffer that contains the text for the tool, or identifier of the string resource that contains the text. This member is sometimes used to return values. If you need to examine the returned value, must point to a valid buffer of sufficient size. Otherwise, it can be set to NULL. If lpszText is set to LPSTR_TEXTCALLBACK, the control sends the TTN_GETDISPINFO notification message to the owner window to retrieve the text.
lParam
Version 4.70 and later. A 32-bit application-defined value that is associated with the tool.
lpReserved
Windows XP and later. Reserved. Must be set to NULL.

Remarks

Normal windows display text left-to-right (LTR). Windows can be mirrored to display languages such as Hebrew or Arabic that read right-to-left (RTL). Normally, ToolTip text is displayed in the same direction as the text in its parent window. If TTF_RTLREADING is set, ToolTip text will read in the opposite direction from the text in the parent window.

Structure Information

Headercommctrl.h
Minimum operating systems Windows NT 3.51, Windows 95
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker