Dela via


CWnd::CancelToolTips

Call this member function to remove a tool tip from the screen if a tool tip is currently displayed.

static void PASCAL CancelToolTips( 
   BOOL bKeys = FALSE  
);

Parameters

  • bKeys
    TRUE to cancel tool tips when a key is pressed and set the status bar text to the default; otherwise FALSE.

Remarks

Note

Using this member function has no effect on tool tips managed by your code. It only affects the tool tip control managed by CWnd::EnableToolTips.

Example

// In this example, tool tips were set up to 
// pop up when the user moves the mouse 
// over this edit control. 
// If the mouse is moved to the upper left-hand 
// corner, the tool tip would disappear because of 
// calling CancelToolTips. 
void CMyEdit::OnMouseMove(UINT nFlags, CPoint point) 
{
   CRect corner(0, 0, 10, 10);
   if (corner.PtInRect(point))
      CancelToolTips();
   CEdit::OnMouseMove(nFlags, point);
}

Requirements

Header: afxwin.h

See Also

Concepts

CWnd Members

Reference

CWnd Class

Hierarchy Chart

CWnd::EnableToolTips

TTM_ACTIVATE