Print Page | Close Window

CreateToolbar

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=13965
Printed Date: 22 June 2025 at 6:43pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CreateToolbar
Posted By: slowsail
Subject: CreateToolbar
Date Posted: 09 April 2009 at 8:44pm
Hi,

I create a toolbar in a view with the codes,


       VERIFY(m_maskviewBar.CreateToolBar(WS_TABSTOP|WS_VISIBLE|WS_CHILD|CBRS_TOOLTIPS, this));
       VERIFY(m_maskviewBar.LoadToolBar(IDR_MASKVIEW_BAR));

       CXTPImageManager*  pImageManager = XTPImageManager();
       pImageManager->SetIcons(IDR_MASKVIEW_BAR, IDB_MASKVIEW_BAR_FOR_ADAPTIVEMESH);


And it's a dll project. The toolbar is generated properly



But it crashes when I click OK or Cancel to quit the DLL. It says "0x00000014" memory is can not be "read"...




Replies:
Posted By: Oleg
Date Posted: 10 April 2009 at 1:23am
Hi,
Try in ExitInstance of your App of dll  add CXTPPaintManager::Done() and XTPImageManager()->RemoveAl();


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


Posted By: slowsail
Date Posted: 10 April 2009 at 2:17am
oleg,

Thanks for your kindly help. But it still crashes.

I also confirm that it's not problem of CXTPImageManager. Actually the crash is still there after I comment the following two line of codes,

///////////////////////////////////
       CXTPImageManager*  pImageManager = XTPImageManager();
       pImageManager->SetIcons(IDR_MASKVIEW_BAR, IDB_MASKVIEW_BAR_FOR_ADAPTIVEMESH);
///////////////////////////////////

It seems that CreateToolBar() or LoadToolBar() generates the crash.


Posted By: slowsail
Date Posted: 12 April 2009 at 8:39pm
I traced the codes, it breaks here.



BTW: I use Extreme Toolkit pro 12.02.


-------------
Intel Q6600
Windows XP SP3
Extreme Toolkit pro 12.02



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