From 4325ac72975587bb04b6cd85d45b4c0d7743b2e3 Mon Sep 17 00:00:00 2001 From: Kevin Wasserman Date: Sat, 21 Jul 2012 16:24:14 -0400 Subject: Fix tooltips for ribbon Signed-off-by: Kevin Wasserman ticket: 7257 (new) queue: kfw target_version: 1.10.4 tags: pullup --- src/windows/leash/MainFrm.cpp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/windows/leash/MainFrm.cpp b/src/windows/leash/MainFrm.cpp index 5f1c6e6622..c66486eeb2 100644 --- a/src/windows/leash/MainFrm.cpp +++ b/src/windows/leash/MainFrm.cpp @@ -90,9 +90,23 @@ CMainFrame::~CMainFrame() int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CLeashApp::m_useRibbon) { - CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows7)); - CDockingManager::SetDockingMode(DT_SMART); - m_wndRibbonBar.SetWindows7Look(TRUE); + // Fixup tooltips (cribbed from http://social.msdn.microsoft.com/Forums/en/vcmfcatl/thread/5c5b4879-d278-4d79-8894-99e7f9b322df) + + CMFCToolTipInfo ttParams; + ttParams.m_bVislManagerTheme = TRUE; + ttParams.m_bVislManagerTheme = FALSE; + ttParams.m_bDrawSeparator = FALSE; + ttParams.m_clrFillGradient = afxGlobalData.clrBarFace; + ttParams.m_clrFill = RGB(255, 255, 255); + ttParams.m_clrBorder = afxGlobalData.clrBarShadow; + ttParams.m_clrText = afxGlobalData.clrBarText; + + theApp.GetTooltipManager()->SetTooltipParams(AFX_TOOLTIP_TYPE_ALL, + RUNTIME_CLASS(CMFCToolTipCtrl), &ttParams); + + CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows7)); + CDockingManager::SetDockingMode(DT_SMART); + m_wndRibbonBar.SetWindows7Look(TRUE); // Create the ribbon bar if (!m_wndRibbonBar.Create(this)) -- cgit