Compartir a través de


TOOLINFO

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This structure contains information about a tool in a ToolTip control.

Syntax

typedef struct tagTOOLINFO {
  UINT cbSize;
  UINT uFlags;
  HWND hwnd;
  UINT uId;
  RECT rect;
  HINSTANCE hinst;
  LPTSTR lpszText;
  LPARAM lParam;
} TTTOOLINFO, NEAR* PTOOLINFO, FAR* LPTTTOOLINFO;

Members

  • cbSize
    Unsigned integer that specifies the size of this structure, in bytes. You must specify a value for this member.
  • uFlags
    Unsigned integer that specifies values that control the display of the ToolTip. The following table shows the possible values, which can be combined.

    Value Description

    TTF_ABSOLUTE

    Positions the ToolTip window at the same coordinates as provided by TTM_TRACKPOSITION. You must use this flag 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 identifier of the tool.

    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 window for the tool in order to intercept messages, such as WM_MOUSEMOVE. If you do not set this flag, 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

    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

    Causes the ToolTip control to forward mouse event messages to the parent window. This forwarding 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, hwnd identifies the window that receives the TTN_GETDISPINFO messages.
  • uId
    Unsigned integer that specifies an application-defined identifier of the tool. If uFlags includes the TTF_IDISHWND flag, uId must specify the window handle to the tool.
  • rect
    RECT structure that specifies the coordinates of the bounding rectangle for 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, the value of rect 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 an identifier of the string resource that contains the text. This member sometimes also returns values. If you need to examine the returned value, be sure that lpszText points to a valid buffer of sufficient size. Otherwise, you can set lpszText to NULL. If you set lpszText to LPSTR_TEXTCALLBACK, the control sends a TTN_GETDISPINFO message to the owner window to retrieve the text.
  • lParam
    A 32-bit application-defined value that is associated with the tool.

Requirements

Header commctrl.h
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

TTM_RELAYEVENT
TTM_TRACKACTIVATE
TTM_TRACKPOSITION
TTN_GETDISPINFO
WM_MOUSEMOVE
RECT