Partager via


CToolTipCtrl Class

Encapsulates the functionality of a "tool tip control," a small pop-up window that displays a single line of text describing the purpose of a tool in an application.

class CToolTipCtrl : public CWnd

Members

Public Constructors

Name

Description

CToolTipCtrl::CToolTipCtrl

Constructs a CToolTipCtrl object.

Public Methods

Name

Description

CToolTipCtrl::Activate

Activates and deactivates the tool tip control.

CToolTipCtrl::AddTool

Registers a tool with the tool tip control.

CToolTipCtrl::AdjustRect

Converts between a tool tip control's text display rectangle and its window rectangle.

CToolTipCtrl::Create

Creates a tool tip control and attaches it to a CToolTipCtrl object.

CToolTipCtrl::CreateEx

Creates a tool tip control with the specified Windows extended styles and attaches it to a CToolTipCtrl object.

CToolTipCtrl::DelTool

Removes a tool from the tool tip control.

CToolTipCtrl::GetBubbleSize

Retrieves the size of the tool tip.

CToolTipCtrl::GetCurrentTool

Retrieves information, such as the size, position, and text, of the tooltip window that the current tooltip control displays.

CToolTipCtrl::GetDelayTime

Retrieves the initial, pop-up, and reshow durations that are currently set for a tool tip control.

CToolTipCtrl::GetMargin

Retrieves the top, left, bottom, and right margins that are set for a tool tip window.

CToolTipCtrl::GetMaxTipWidth

Retrieves the maximum width for a tool tip window.

CToolTipCtrl::GetText

Retrieves the text that a tool tip control maintains for a tool.

CToolTipCtrl::GetTipBkColor

Retrieves the background color in a tool tip window.

CToolTipCtrl::GetTipTextColor

Retrieves the text color in a tool tip window.

CToolTipCtrl::GetTitle

Retrieves the title of the current tooltip control.

CToolTipCtrl::GetToolCount

Retrieves a count of the tools maintained by a tool tip control.

CToolTipCtrl::GetToolInfo

Retrieves the information that a tool tip control maintains about a tool.

CToolTipCtrl::HitTest

Tests a point to determine whether it is within the bounding rectangle of the given tool. If so, retrieves information about the tool.

CToolTipCtrl::Pop

Removes a displayed tool tip window from view.

CToolTipCtrl::Popup

Causes the current ToolTip control to display at the coordinates of the last mouse message.

CToolTipCtrl::RelayEvent

Passes a mouse message to a tool tip control for processing.

CToolTipCtrl::SetDelayTime

Sets the initial, pop-up, and reshow durations for a tool tip control.

CToolTipCtrl::SetMargin

Sets the top, left, bottom, and right margins for a tool tip window.

CToolTipCtrl::SetMaxTipWidth

Sets the maximum width for a tool tip window.

CToolTipCtrl::SetTipBkColor

Sets the background color in a tool tip window.

CToolTipCtrl::SetTipTextColor

Sets the text color in a tool tip window.

CToolTipCtrl::SetTitle

Adds a standard icon and title string to a tool tip.

CToolTipCtrl::SetToolInfo

Sets the information that a tool tip maintains for a tool.

CToolTipCtrl::SetToolRect

Sets a new bounding rectangle for a tool.

CToolTipCtrl::SetWindowTheme

Sets the visual style of the tool tip window.

CToolTipCtrl::Update

Forces the current tool to be redrawn.

CToolTipCtrl::UpdateTipText

Sets the tool tip text for a tool.

Remarks

A "tool" is either a window, such as a child window or control, or an application-defined rectangular area within a window's client area. A tool tip is hidden most of the time, appearing only when the user puts the cursor on a tool and leaves it there for approximately one-half second. The tool tip appears near the cursor and disappears when the user clicks a mouse button or moves the cursor off the tool.

CToolTipCtrl provides the functionality to control the initial time and duration of the tool tip, the margin widths surrounding the tool tip text, the width of the tool tip window itself, and the background and text color of the tool tip. A single tool tip control can provide information for more than one tool.

The CToolTipCtrl class provides the functionality of the Windows common tool tip control. This control (and therefore the CToolTipCtrl class) is available only to programs running under Windows 95/98 and Windows NT versions 3.51 and later.

For more information about enabling tool tips, see Tool Tips in Windows not Derived from CFrameWnd.

For more information on using CToolTipCtrl, see Controls and Using CToolTipCtrl.

Inheritance Hierarchy

CObject

CCmdTarget

CWnd

CToolTipCtrl

Requirements

Header: afxcmn.h

See Also

Reference

CWnd Class

Hierarchy Chart

CToolBar Class