Print Page | Close Window

how to add a control into the CXTPToolBar?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=11577
Printed Date: 28 February 2025 at 10:34pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: how to add a control into the CXTPToolBar?
Posted By: chentob
Subject: how to add a control into the CXTPToolBar?
Date Posted: 25 July 2008 at 2:54am
I want to add a CStatic or CCombobox  control into the CXTPToolBar.but I failed.  It is ok when using CToolBar .
 
 
My code following:
 
CStatic         m_static;
 
CXTPToolBar* pStandardBar;
CXTPCommandBars* pCommandBars;
 
if (!pFrame->InitCommandBars())
  return -1;
 
 
 pCommandBars = pFrame->GetCommandBars();
 
 pStandardBar = (CXTPToolBar*)pCommandBars->Add(_T("Standard"), xtpBarBottom);
 if (!pStandardBar ||
  !pStandardBar->LoadToolBar(IDR_TOOLBAR))
 {
  TRACE0("Failed to create toolbar\n");
  return -1;
 }
 
this->m_static.Create( "test" , WS_CHILD | WS_VISIBLE | SS_CENTER | SS_CENTERIMAGE | SS_SUNKEN , rect , pStandardBar);
 
 
the static could not display "test" in Toolbar, I don't know why?Thanks
 



Replies:
Posted By: Oleg
Date Posted: 28 July 2008 at 2:52am
Hi,
 
Check \Samples\CommandBars\CommonControls  sample


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



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