Print Page | Close Window

Modeless CXTPPropertySheet crash

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=9515
Printed Date: 14 November 2025 at 2:34pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Modeless CXTPPropertySheet crash
Posted By: larryp
Subject: Modeless CXTPPropertySheet crash
Date Posted: 06 February 2008 at 1:16pm
I am using version 11.2.2
 
If I create a CXTPPropertySheet with a CXTPPropertyPageListNavigator as a modelss dialog, the page does not show and if I click on it I get a crash.
 
I modified the CodeJock PropertySheet sample as follows:
 

void CPropertySheetDlg::OnButtonList2() {

   CXTPPropertySheet* ps = new CXTPPropertySheet(_T("CXTPPropertyPageListNavigator Sample"));

   CXTPPropertyPageListNavigator* pList = new   CXTPPropertyPageListNavigator();

   pList->SetListStyle(xtListBoxOffice2007);

   ps->SetNavigator(pList);

   CTabLongPage pageLong;

   ps->AddPage(&pageLong);

   ps->SetResizable();

   ps->SetPageSize(CSize(250, 180)); // in dialog units

   ps->Create( this );

   //ps->DoModal();

}
 



Replies:
Posted By: Oleg
Date Posted: 07 February 2008 at 12:41am
Hi,
 
Obviously problem because pageLong is destroed after function exit scope. Create it dynamically or move to member variables of derived CXTPPropertySheet class.
 
See OnButtonTree method.


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


Posted By: larryp
Date Posted: 07 February 2008 at 8:29am
You are right.  That is obvious.  Sorry for wasting your time.
 
Larry



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