Precondition: The application is MFC C++ that uses BCGControlBar library for UI rendering.
Topic: We can add Backstage Views and Commands to BCG Ribbon Backstage Main Panel. Something like it:
auto pBackstagePanel = m_wndRibbonBar.AddBackstageCategory(_T("File"), IDB_FILESMALL);
// views
pBackstagePanel->AddView(ID_BACKSTAGE_INFO, _T("Info"), new CBCGPRibbonBackstageViewItemForm (IDD_FORM_INFO, RUNTIME_CLASS(CBackStagePageInfo)));
pBackstagePanel->AddView(ID_BACKSTAGE_RECENT, _T("Recent"), new CBCGPRibbonBackstageViewItemForm (IDD_FORM_RECENTFILES, RUNTIME_CLASS(CBackStagePageRecentFiles)));
// commands
pBackstagePanel->AddCommand (ID_FILE_SAVE, _T("Save"), 2);
pBackstagePanel->AddCommand (ID_OPTIONS, _T("Options"), 3);
pBackstagePanel->AddCommand (ID_APP_EXIT, _T("Exit"), 3);
But BCG Backstage Main Panel has UI bug: ribbon buttons for views (method AddView()
) and commands (method AddCommand()
) are rendered with different widths!
So hovered or focused state of ribbon button for command are rendered narrower than for views by around 6px.
You can see this bug even in BCG samples that use BCG Ribbon (e.g DrawCli):
Question: Do you know the way how to fix it and have equal width for all elements in the backstage main panel?