Print Page | Close Window

CXTPRebar problem

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=811
Printed Date: 24 December 2024 at 9:19pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPRebar problem
Posted By: vdminh
Subject: CXTPRebar problem
Date 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




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net