Hi Oleg and team,
First, let me say that I'm very pleased with the framework you've built.
I've followed the RibbonSample precisely, but have spent a couple hours now trying to figure out why I still have a typical Vista window frame around the Ribbon window. (Please see screenshot at: http://www.bigoven.com/images/tour/ribbon-notright.jpg - http://www.bigoven.com/images/tour/ribbon-notright.jpg ).
I've gone into the .rc2 file and added the pointer to the Office2007Blue resources, and there are no compile errors. The gradients for the ribbons appear to be there and the control is working well, BUT the overall XTPFrameWnd isn't painting properly -- how do I get that to paint properly?
excerpt from CreateRibbonBar:
BOOL CMainFrame::CreateRibbonBar()
{
CXTPCommandBars* pCommandBars = GetCommandBars();
CMenu menu;
menu.Attach(::GetMenu(m_hWnd));
SetMenu(NULL);
CXTPRibbonBar* pRibbonBar = (CXTPRibbonBar*)pCommandBars->Add(_T("The Ribbon"), xtpBarTop, RUNTIME_CLASS(CXTPRibbonBar));
if (!pRibbonBar)
{
return FALSE;
}
pRibbonBar->EnableDocking(0);
pRibbonBar->GetTabPaintManager()->m_bSelectOnButtonDown = FALSE;
CXTPControlPopup* pControlFile = (CXTPControlPopup*)pRibbonBar->AddSystemButton(ID_MENU_FILE);
pControlFile->SetCommandBar(menu.GetSubMenu(0));
pControlFile->SetIconId(IDB_GEAR);
UINT uCommand = {IDB_GEAR};
LoadCommandBars(_T("CommandBars"));
pCommandBars->GetImageManager()->SetIcons(IDB_GEAR, &uCommand, 1, xtpImageNormal);
CXTPRibbonTab* pTabHome = pRibbonBar->AddTab(ID_TAB_HOME);
CXTPRibbonTab* pTabRecipes = pRibbonBar->AddTab(ID_TAB_RECIPES);
CXTPRibbonTab* pTabMenus = pRibbonBar->AddTab(ID_TAB_MENUS);
CXTPRibbonTab* pTabPlan = pRibbonBar->AddTab(ID_TAB_PLAN);
CXTPRibbonTab* pTabShop = pRibbonBar->AddTab(ID_TAB_SHOP);
CXTPRibbonTab* pTabPublish = pRibbonBar->AddTab(ID_TAB_PUBLISH);
CXTPRibbonGroup* pGroupClipborad = pTabHome->AddGroup(ID_GROUP_CLIPBOARD);
pGroupClipborad->ShowOptionButton();
|