CTooltipManager::SetTooltipParams
Customizes the appearance of the tooltip control for the specified Windows control types.
void SetTooltipParams(
UINT nTypes,
CRuntimeClass* pRTC=RUNTIME_CLASS(CMFCToolTipCtrl),
CMFCToolTipInfo* pParams=NULL
);
Parameters
[in] nTypes
Specifies control types.[in] pRTC
Runtime class of custom tooltip.[in] pParams
Tooltip parameters.
Remarks
This method sets the runtime class and initial parameters that the CTooltipManager Class uses when it creates tooltips. When a control calls CTooltipManager::CreateToolTip and passes in a tooltip type that is one of the types indicated by nTypes, the tooltip manager creates a tooltip control that is an instance of the runtime class specified by pRTC and passes the parameters specified by pParams to the new tooltip.
When you call this method, all existing tooltip owners receive the AFX_WM_UPDATETOOLTIPS message and they must re-create their tooltips by using CTooltipManager::CreateToolTip.
nTypes can be any combination of the valid tooltip types that CTooltipManager::CreateToolTip uses, or it can be AFX_TOOLTIP_TYPE_ALL. If you pass AFX_TOOLTIP_TYPE_ALL, all tooltip types are affected.
Example
The following example demonstrates how to use the SetTooltipParams method of the CTooltipManager class. This code snippet is part of the DrawClient Sample: MFC Ribbon-Based OLE Object Drawing Application.
CMFCToolTipInfo params;
params.m_bVislManagerTheme = TRUE;
theApp.GetTooltipManager()->SetTooltipParams(AFX_TOOLTIP_TYPE_ALL, RUNTIME_CLASS(CMFCToolTipCtrl), ¶ms);
Requirements
Header: afxtooltipmanager.h