![]() |
[Solved]show backstage view when application start |
Post Reply ![]() |
Author | |
hobak2joa ![]() Newbie ![]() Joined: 06 February 2013 Location: Korea seoul Status: Offline Points: 1 |
![]() ![]() ![]() ![]() ![]() Posted: 06 February 2013 at 8:19pm |
I'm using ribbon style MDI based. let me know how to access backstage view, how to start application with backstage view.. -------------------------------------------------------------------------------------------------------- 1. make this function in CMainFrame void CMainFrame::SetStartUp() { CXTPRibbonBar* pRibbonBar = DYNAMIC_DOWNCAST(CXTPRibbonBar, GetCommandBars()->GetMenuBar()); CXTPControls* pControls = pRibbonBar->GetSystemButton()->GetControls(); //this control is "File" Control... CXTPControlPopup* pControl = (CXTPControlPopup*)pControls->GetAt(0); BOOL bSuccess = pRibbonBar->GetSystemButton()->GetCommandBar()->Popup(pControl); //Clean up Tab Highlight pRibbonBar->GetSelectedTab()->GetTabManager()->SetActive(FALSE); } 2. Call Function in App::InitInstance() 3.End |
|
![]() |
|
SuperMario ![]() Admin Group ![]() ![]() Joined: 14 February 2004 Status: Offline Points: 18057 |
![]() ![]() ![]() ![]() ![]() |
There is a few ways:
// Set original default tab to false, then set new tab to true CXTPRibbonBackstageView *pView = DYNAMIC_DOWNCAST(CXTPRibbonBackstageView, pRibbonBar->GetSystemButton()->GetCommandBar()); CXTPRibbonBackstageTab* pTab = DYNAMIC_DOWNCAST(CXTPRibbonBackstageTab, pView->GetControls()->FindControl(ID_BACKSTAGE_INFO)); pTab->SetItemDefault(FALSE); pTab = DYNAMIC_DOWNCAST(CXTPRibbonBackstageTab, pView->GetControls()->FindControl(ID_BACKSTAGE_HELP)); pTab->SetItemDefault(TRUE); CXTPControl* pButton = pRibbonBar->GetSystemButton(); pButton->OnClick(TRUE); // Set Active Tab after you show backstage CXTPControl* pButton = pRibbonBar->GetSystemButton(); pButton->OnClick(TRUE); CXTPRibbonBackstageView *pView = DYNAMIC_DOWNCAST(CXTPRibbonBackstageView, pRibbonBar->GetSystemButton()->GetCommandBar()); CXTPRibbonBackstageTab* pTab = DYNAMIC_DOWNCAST(CXTPRibbonBackstageTab, pView->GetControls()->FindControl(ID_BACKSTAGE_HELP)); pView->SetActiveTab(pTab);
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |