Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTPRebar problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPRebar problem

 Post Reply Post Reply
Author
Message
vdminh View Drop Down
Newbie
Newbie


Joined: 04 June 2003
Location: Vietnam
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote vdminh Quote  Post ReplyReply Direct Link To This Post Topic: CXTPRebar problem
    Posted: 05 June 2004 at 11:01pm

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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.922 seconds.