BCGControlBar Pro for MFC

Detailed Description

The CBCGPToolTipCtrl implements a custom tooltip control. It extends the standard tooltip control implementing the following features:

  • Ability to display icon, text and description.
  • Gradient fill.
  • Custom text color.
  • Bold text.
  • Custom border color.
  • Balloon style.

You can derive your own class from CBCGPToolTipCtrl and completely control tooltip behavior and rendering. Also, you can enable the above features using the CBCGPToolTipParams class.

See also
CBCGPTooltipManager, CBCGPToolTipParams

How to use the tooltip control:

// Custom CBCGPToolTipParams:
params.m_bBoldLabel = m_bBoldLabel;
params.m_bDrawDescription = m_bDrawDescription;
params.m_bDrawIcon = m_bDrawIcon;
params.m_bRoundedCorners = m_bRoundedCorners;
params.m_bDrawSeparator = m_bDrawSeparator;
if (m_bCustomColors)
params.m_clrFill = RGB (255, 255, 255);
params.m_clrFillGradient = RGB (228, 228, 240);
params.m_clrText = RGB (61, 83, 80);
params.m_clrBorder = RGB (144, 149, 168);
theApp.GetTooltipManager ()->SetTooltipParams (BCGP_TOOLTIP_TYPE_ALL, RUNTIME_CLASS (CBCGPToolTipCtrl), &params);
// Use a custom tooltip class (CMyToolTipCtrl is a custom tooltip class):
theApp.GetTooltipManager ()->SetTooltipParams (BCGP_TOOLTIP_TYPE_ALL, RUNTIME_CLASS (CMyToolTipCtrl));
// Restore the standard tooltip:
theApp.GetTooltipManager ()->SetTooltipParams (BCGP_TOOLTIP_TYPE_ALL, NULL, NULL);
// Enable balloon-style tooltip:
CBCGPToolTipParams paramsBalloon; paramsBalloon.m_bBallonTooltip = TRUE;
theApp.GetTooltipManager ()->SetTooltipParams ( BCGP_TOOLTIP_TYPE_ALL, RUNTIME_CLASS (CBCGPToolTipCtrl), &paramsBalloon);

Inherits CToolTipCtrl.

Public Member Functions

 GetIconSizeReturns icon size.
 GetParamsReturns tooltip parameters.
 OnDrawBorderCalled by the framework when it needs to draw tooltip border.
 OnDrawDescriptionCalled by the framework when it needs to draw tooltip description.
 OnDrawHelpPromptCalled by the framework to draw help prompt.
 OnDrawIconCalled by the framework when it needs to display tooltip icon.
 OnDrawLabelCalled by the framework when it needs to draw tooltip label.
 OnDrawSeparatorCalled by the framework to draw separator between tooltip label and description.
 OnFillBackgroundCalled by the framework when it needs to fill the tooltip background.
 SetDescriptionSets description to be displayed by tooltip.
 SetParamsSets tooltip parameters.