Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Modeless CXTPPropertySheet crash
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Modeless CXTPPropertySheet crash

 Post Reply Post Reply
Author
Message
larryp View Drop Down
Groupie
Groupie


Joined: 15 January 2005
Location: United States
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote larryp Quote  Post ReplyReply Direct Link To This Post Topic: Modeless CXTPPropertySheet crash
    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();

}
 
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
larryp View Drop Down
Groupie
Groupie


Joined: 15 January 2005
Location: United States
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote larryp Quote  Post ReplyReply Direct Link To This Post Posted: 07 February 2008 at 8:29am
You are right.  That is obvious.  Sorry for wasting your time.
 
Larry
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.043 seconds.