Hi everybody,
My application needs to add banner at (top, right) corner of Main frame. With Xtreme version 2.0, i used CXTRebar to group toolbar and banner panel together, it worked well. I like new features of Xtreme Toolkit Pro 8.70, so i tried to modify my application, but i was stuck in using CXTPRebar: The toolbar didn't display after adding it to CXTPRebar. Does anybody show me how to fix this problem? This is my code i did to add toolbar to CXTPRebar :
In CMainFrame:OnCreate() :
////////////////////////////////////////////
...
//Init command bar for main frame
if (!InitCommandBars())
{
TRACE0("Failed to initialize command bars\n");
return FALSE;
}//if
//Setup menu bar
CXTPCommandBars* pCommandBars = GetCommandBars();
pCommandBars->GetCommandBarsOptions()->bShowExpa ndButtonAlways = FALSE;
CXTPCommandBar* pMenuBar = pCommandBars->SetMenu(_T("Menu Bar"), IDR_MAINFRAME);
//Setup standard toolbar
CXTPToolBar* pCommandBar = (CXTPToolBar*)pCommandBars->Add(_T("Standard"), xtpBarTop);
if (!pCommandBar || !pCommandBar->LoadToolBar(IDR_MAINFRAME))
{
TRACE0("Failed to create toolbar\n");
return FALSE;
}//if
....
//Create rebar and adding toolbar to it. m_wndRebar is CXTPRebar
if(!m_wndRebar.Create(this) || m_wndRebar.Add(pCommandBar ))
{
ASSERT(FALSE);
}
///////////////////////////////
Thank you so much
Edited by vdminh