Share via


CToolTipCtrl::GetCurrentTool

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

BOOL GetCurrentTool(
     LPTOOLINFO lpToolInfo
) const;

Parameters

Parameter

Description

[out] lpToolInfo

Pointer to a TOOLINFO structure that receives information about the current tooltip window.

Return Value

true if the information is retrieved successfully; otherwise, false.

Remarks

This method sends the TTM_GETCURRENTTOOL message, which is described in the Windows SDK.

Requirements

Header: afxcmn.h

Example

The following code example retrieves information about the current tooltip window.

    {
        //Get information about the current tooltip. 
        TOOLINFO tInfo = {0};
        tInfo.cbSize = sizeof(TOOLINFO);
        CToolBarCtrl& m_toolBarCtrl = m_wndToolBar.GetToolBarCtrl();
        CToolTipCtrl* m_toolTip = m_toolBarCtrl.GetToolTips();
        BOOL bRet = m_toolTip->GetCurrentTool( &tInfo );
    }

See Also

Reference

CToolTipCtrl Class

Hierarchy Chart

TTM_GETCURRENTTOOL

TOOLINFO

Other Resources

CToolTipCtrl Members