I've got a problem I'm trying to solve with a ribbon bar that contains a few tabs along with a System Button representing the File Menu which contains a backstage view. We've customized the colors in our theme, so that unselected tabs appear with a blue background. The problem I'm experiencing is that since the selected versus unselected tabs have different background colors, when I open up the backstage view under the file menu, CXTPRibbonTabColorSet::SetTextColor() appears to be treating the selected tab as unselected from this code:
if (bSelected && pRibbonBar->IsBackstageViewVisible()) bSelected = FALSE;
and my previously selected ribbon bar tab is being treated as unselected, and I'm getting white text on a white background for that tab.
Is there a better way to add the backstage view to the ribbon bar than with this:
CXTPControlPopup* pControlFile = (CXTPControlPopup*)m_pRibbonBar->AddSystemButton(ID_RBN_FILE);
CXTPRibbonBackstageView* pView = CXTPRibbonBackstageView::CreateBackstageView(GetCommandBars()); CXTPRibbonControlSystemButton* pButton = m_pRibbonBar->GetSystemButton();
if( !m_filePageInfo.GetSafeHwnd() ) { m_filePageInfo.Create(CFilePageInfo::IDD, this); }
if( !m_filePageOpen.GetSafeHwnd() ) { m_filePageOpen.Create(CFilePageOpen::IDD, this); }
if( !m_filePageOptions.GetSafeHwnd() ) { m_filePageOptions.Create(CFilePageOptions::IDD, this); }
if( !m_filePageActions.GetSafeHwnd() ) { m_filePageActions.Create(CFilePageActions::IDD, this); }
if( !m_filePagePrint.GetSafeHwnd() ) { m_filePagePrint.Create(CFilePagePrint::IDD, this); }
if( !m_filePageSave.GetSafeHwnd() ) { m_filePageSave.Create(CFilePageSave::IDD, this); }
CXTPRibbonBackstageTab* pTabDefault = AddBackstageTab(*pView, m_filePageInfo, ID_MENU_INFO, dTabFlags); AddBackstageTab(*pView, m_filePageOpen, ID_MENU_OPEN, dTabFlags); AddBackstageTab(*pView, m_filePageSave, ID_MENU_SAVE, dTabFlags); AddBackstageTab(*pView, m_filePagePrint, ID_MENU_PRINT, dTabFlags); AddBackstageTab(*pView, m_filePageOptions, ID_MENU_OPTIONS, dTabFlags); AddBackstageTab(*pView, m_filePageActions, ID_MENU_ACTIONS, dTabFlags);
or is there similar code missing in the render path for the tab button background to treat that as unselected if the backstage view is visible?
|