void CXTPRibbonGroupPopupToolBar::CreateKeyboardTips() { if (!m_pParentGroup) return; CXTPRibbonTab* pSelectedTab = m_pParentGroup->GetParentTab(); for (int i = 0; i < pSelectedTab->GetGroups()->GetCount(); i++) { CXTPRibbonGroup* pGroup = pSelectedTab->GetGroups()->GetAt(i); BOOL bVisible = pGroup->IsVisible() && m_pParentGroup == pGroup; if (bVisible) { pGroup = m_pRibbonGroup; } for (int j = 0; j < pGroup->GetCount(); j++) { CXTPControl* pControl = pGroup->GetAt(j); CreateControlKeyboardTips(pControl, NULL, bVisible); } if ((pGroup->GetControlGroupOption()->GetHideFlags() & xtpHideGeneric) == 0) { CreateControlKeyboardTips(pGroup->GetControlGroupOption(), NULL, bVisible); } CreateControlKeyboardTips(pGroup->GetControlGroupPopup(), _T("Z"), bVisible); } }
void CXTPRibbonTabPopupToolBar::DrawCommandBar(CDC* pDC, CRect rcClipBox) { CXTPRibbonPaintManager* pPaintManager = GetPaintManager()->GetRibbonPaintManager(); pPaintManager->FillTabPopupToolBar(pDC, this); pPaintManager->FillGroupRect(pDC, m_pRibbonTab, m_rcGroups); pDC->SetBkMode(TRANSPARENT); CXTPRibbonGroups* pGroups = m_pRibbonTab->GetGroups(); for (int i = 0; i < pGroups->GetCount(); i++) { CXTPRibbonGroup* pGroup = pGroups->GetAt(i); if (pGroup->IsVisible() && CRect().IntersectRect(rcClipBox, pGroup->GetRect())) { pGroup->Draw(pDC, rcClipBox); } } if (m_pControlScrollGroupsLeft->IsVisible()) { m_pControlScrollGroupsLeft->Draw(pDC); } if (m_pControlScrollGroupsRight->IsVisible()) { m_pControlScrollGroupsRight->Draw(pDC); } }