krb5 commit: Fix tooltips for ribbon

Benjamin Kaduk kaduk at MIT.EDU
Fri Aug 24 15:55:19 EDT 2012


https://github.com/krb5/krb5/commit/4325ac72975587bb04b6cd85d45b4c0d7743b2e3
commit 4325ac72975587bb04b6cd85d45b4c0d7743b2e3
Author: Kevin Wasserman <kevin.wasserman at painless-security.com>
Date:   Sat Jul 21 16:24:14 2012 -0400

    Fix tooltips for ribbon
    
    Signed-off-by: Kevin Wasserman <kevin.wasserman at painless-security.com>
    
    ticket: 7257 (new)
    queue: kfw
    target_version: 1.10.4
    tags: pullup

 src/windows/leash/MainFrm.cpp |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/src/windows/leash/MainFrm.cpp b/src/windows/leash/MainFrm.cpp
index 5f1c6e6..c66486e 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))


More information about the cvs-krb5 mailing list