Print Page | Close Window

Error about Add 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=15371
Printed Date: 27 February 2025 at 12:07pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Error about Add CXTPToolBar
Posted By: suchout
Subject: Error about Add CXTPToolBar
Date Posted: 15 October 2009 at 3:38am

Hello everybody!

First, I'd like to beg your pardon that I'm quite poor in English. 

I developed a MDI application which  make new User-Interface by call DLL.
 
when i made Project , a MenuBar and a ToolBar was basically created.
 
and then i add  new  CXTPToolBar in Main Project!.
 
like this:
  m_pToolBar = (CXTPToolBar*)m_pCmdBars->Add(_T(""), xtpBarTop);
  if (!m_pToolBar ) {
   TRACE0("Failed to create toolbar\n");
   return;
  } 
 
in Dll
I  set properties and add buttons
 
so far it has not problem
 
but Cause Error in the moment of the program is exitting.
 
show up this message:
debug Assertion Failed!
File:
c:\package\temp\eval\toolkitpro\source\commandbars\xtpdockstate.cpp
line : 1208
 
i am not able to solve this problem ㅠㅠ please help me~~
 
thanks
 
ps...oops~ my english is better????? .....hm....but it's only my think..^^;;ㅋㅋ sorry 전 한국인..부끄럽네요..ㅎㅎ^^
 



Replies:
Posted By: Oleg
Date Posted: 16 October 2009 at 5:34am
Hi,
 
You store  m_pToolBar - why ? Do you manually destroy it or something ?


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


Posted By: suchout
Date Posted: 18 October 2009 at 9:36pm
Hi. Thanks
 
m_pToolBar is just instance for check about correctly make Toolbar
 
and i don't do anything manually
 
Just add new Toolbar and add buttons in there
 
this is sample source
 
if (!pToolBar || !pToolBar->LoadToolBar(IDR_MAINFRAME))
 {
  TRACE0("Failed to create toolbar\n");
  return -1;
 }
 
but my source is
 
if (!pToolBar )
 {
  TRACE0("Failed to create toolbar\n");
  return -1;
 }
 
Not use LoadToolBar(IDR_MAINFRAME),  but add buttons dynamically )
 
and i'm trying for coment (/*  */) that toolbar add code area
 
then the exit process is no problem, but none coment -> error
 
hm....i feel heavy..ㅠㅠ because my explane is so~oooooooo bad....ㅠㅠ
 
thank you .



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