Print Page | Close Window

Crash using themes in CXTTabCtrl

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=5151
Printed Date: 21 October 2025 at 1:04pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Crash using themes in CXTTabCtrl
Posted By: Mark Swaisgood
Subject: Crash using themes in CXTTabCtrl
Date Posted: 26 September 2006 at 10:54am
Xtreme Toolkit Pro v10.2
 
VS.NET 2003
 
Using CXTTabCtrl in two different views.
Set the themes:

m_tab_ctrl.SetTheme(ThemeManager::Instance().GetThemeStyle());

where ThemeManager returns xtThemeOffice2003, etc.
 
During app use the tabs show up with the appropriate theme. At exit, it crashes in:
 
CXTThemeManager::~CXTThemeManager()
{
 POSITION pos = m_mapDefaultFactories.GetStartPosition();
 void* pThemeFactoryClass;
 CXTThemeManagerStyleFactory* pFactory = 0;
 while (pos)
 {
  m_mapDefaultFactories.GetNextAssoc(pos, pThemeFactoryClass, (void *&)pFactory);
  SAFE_DELETE(pFactory);
 }
 ASSERT(m_factoryList.m_pHead == 0);  <<<<<<<<<<< asserts here then crashes
 m_factoryList.RemoveAll();
}
 
Call Stack:
> TyperAnalyzerD.exe!CXTThemeManager::~CXTThemeManager()  Line 317 + 0x1d C++
  TyperAnalyzerD.exe!CXTThemeManager::`scalar deleting destructor'()  + 0x2b C++
  mfc71d.dll!CProcessLocalObject::~CProcessLocalObject()  Line 472 + 0x26 C++
Note that if I only open one of the two views or only set the theme on one of the two views there is no crash.
 
Any help would be appreciated,
 
Mark
 



Replies:
Posted By: dijesh.k.a
Date Posted: 13 November 2006 at 5:12am

hai,

  U can use  CXTPTabControl  instead of  CXTTabCtrl.

 
 


-------------
Dijesh.K.A



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