CMFCPropertyGridToolTipCtrl Class

Implements a tooltip control that the CMFCPropertyGridCtrl Class uses to display tooltips.

class CMFCPropertyGridToolTipCtrl : public CWnd

Members

Public Constructors

Name

Description

CMFCPropertyGridToolTipCtrl::CMFCPropertyGridToolTipCtrl

Constructs a CMFCPropertyGridToolTipCtrl object.

CMFCPropertyGridToolTipCtrl::~CMFCPropertyGridToolTipCtrl

Destructor.

Public Methods

Name

Description

CMFCPropertyGridToolTipCtrl::Create

Creates a window for the tooltip control.

CMFCPropertyGridToolTipCtrl::Deactivate

Deactivates and hides the tooltip control.

CMFCPropertyGridToolTipCtrl::GetLastRect

Returns the coordinates of the last position of the tooltip control.

CMFCPropertyGridToolTipCtrl::Hide

Hides the tooltip control.

CMFCPropertyGridToolTipCtrl::PreTranslateMessage

Used by class CWinApp to translate window messages before they are dispatched to the TranslateMessage and DispatchMessage Windows functions. (Overrides CWnd::PreTranslateMessage.)

CMFCPropertyGridToolTipCtrl::SetTextMargin

Sets the spacing between the tooltip text and the border of the tooltip window.

CMFCPropertyGridToolTipCtrl::Track

Displays the tooltip control.

Remarks

Tooltips are displayed when the pointer rests on a property name. The CMFCPropertyGridToolTipCtrl Class class displays a tooltip so that it is easily readable by the user. Usually, the position of a tooltip is determined by the position of the pointer. By using this class, the tooltip appears over the property name and resembles the natural property extension, so that the property name is fully visible.

MFC automatically creates this control and uses it in the CMFCPropertyGridCtrl Class.

Example

The following example demonstrates how to construct an object of the CMFCPropertyGridToolTipCtrl class, and how to display the tooltip control.

    CMFCPropertyGridToolTipCtrl* pToolTipCtrl = new CMFCPropertyGridToolTipCtrl();
    CRect crect(1,1,50,50);
    pToolTipCtrl->Track( crect, _T("this is a tool tip control"));

Inheritance Hierarchy

CObject

   CCmdTarget

      CWnd

         CMFCPropertyGridToolTipCtrl

Requirements

Header: afxpropertygridtooltipctrl.h

See Also

Reference

Hierarchy Chart

Other Resources

MFC Classes