COXToolTipCtrl::AddTool

Dundas

COXToolTipCtrl::AddTool

Members | Overview

BOOL AddTool(CWnd* pWnd, UINT nIDText, LPCRECT lpRectTool = NULL, UINT nIDTool = 0)

BOOL AddTool(CWnd* pWnd, LPCTSTR szText, LPCRECT lpRectTool = NULL, UINT nIDTool = 0)

Parameters

pWnd

Pointer to the window that contains the tool.
 

nIDText

ID of the string resource that contains the text or the tool. If the text contains a '\r' character, then all text before the \r is the standard tooltip text, and all text after the \r will be displayed as extended text if the use clicks on the tooltip.
 

lpszText

Pointer to the text for the tool. If the text contains a '\r' character, then all text before the \r is the standard tooltip text, and all text after the \r will be displayed as extended text if the user clicks on the tooltip. If the text is LPSTR_TEXTCALLBACK then the control will send the TTN_NEEDTEXT notification message to the parent window to retrieve the text.
 

lpRectTool

Pointer to a RECT structure containing coordinates of the tool's bounding rectangle, using client coordinates relative to the window identified by pWnd.
 

nIDTool

ID of the tool.
 

Return Value

TRUE on success, FALSE otherwise.

Remarks

Registers a tool with the tooltip control, so that the information stored in the tooltip is displayed when the cursor is over the tool.

See also: GetToolCount | DelTool