Reputation: 169
I manually added a Ribbon tab and called it from CMainFrm::OnCreate()
but it's strange that if I did SetMenu(NULL)
the line with Quick Access Bar is there.
What is wrong here? Why there are 2 blue lines(I am not really sure how to call it) getting displayed?
(I was expecting to get only one blue line which is ribbon area)
code:
BOOL CMainFrame::CreateRibbon()
{
CXTPCommandBars* pCommandBars = GetCommandBars();
CMenu menu;
menu.Attach(::GetMenu(m_hWnd));
SetMenu(NULL);
// ribbon
CXTPRibbonBar* pRibbonBar =
(CXTPRibbonBar*)pCommandBars->Add(_T("The Ribbon"),
xtpBarTop, RUNTIME_CLASS(CXTPRibbonBar));
if(!pRibbonBar){
return FALSE;
}
pRibbonBar->EnableDocking(0);
pRibbonBar->ShowQuickAccess(FALSE);
// Home tab
CXTPRibbonTab* pTapMenu = pRibbonBar->AddTab("홈");
CXTPRibbonGroup* pMenuGroup = pTapMenu->AddGroup("first group");
pMenuGroup->Add(xtpControlButton,IDS_RIBBON_A);
}
Upvotes: 0
Views: 73