CToolTipCtrl::AddTool

BOOLAddTool(CWnd*pWnd,UINTnIDText**,LPCRECTlpRectTool=NULL,UINTnIDTool=0);**

BOOLAddTool(CWnd*pWnd,LPCTSTRlpszText**=LPSTR_TEXTCALLBACK,LPCRECTlpRectTool=NULL,UINTnIDTool=0);**

Return Value

Nonzero if successful; otherwise 0.

Parameters

pWnd

Pointer to the window that contains the tool.

nIDText

ID of the string resource that contains the text for the tool.

lpRectTool

Pointer to a structure containing coordinates of the tool’s bounding rectangle. The coordinates are relative to the upper-left corner of the client area of the window identified by pWnd.

nIDTool

ID of the tool.

lpszText

Pointer to the text for the tool. If this parameter contains the value LPSTR_TEXTCALLBACK, TTN_NEEDTEXT notification messages go to the parent of the window that pWnd points to.

Remarks

A tool tip control can be associated with more than one tool. Call this function to register a tool with the tool tip control, so that the information stored in the tool tip is displayed when the cursor is on the tool.

Example

See the example for CPropertySheet::GetTabControl.

CToolTipCtrl OverviewClass MembersHierarchy Chart

See Also   CToolTipCtrl::DelTool