Print Page | Close Window

CXTPPropertySheet GetPage problem

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=15378
Printed Date: 21 June 2025 at 3:42pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPPropertySheet GetPage problem
Posted By: evoX
Subject: CXTPPropertySheet GetPage problem
Date Posted: 15 October 2009 at 10:41pm
I have an application wich uses GetPage in the MainSheet initdialog and it worked before the latest VS 2008 updates and now it always returns null :(

CPage1* page1 = (CPage1*) this->GetPage(0);

Is there any incompatibility between CJ toolkit and the latest VS 2008 updates ?
 
 


-------------
Product: Xtreme ToolkitPro 19.30
Platform: Windows 10 64bit
Language: Visual C++ (VS 2019)



Replies:
Posted By: Oleg
Date Posted: 16 October 2009 at 5:30am
Hi,
 
Difficult to say without sample to debug.   check what value returns GetPageCount();


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


Posted By: evoX
Date Posted: 16 October 2009 at 1:56pm
GetPageCount returns 8 because I have 8 pages, I call the GetPage function in OnInitDialog of the CXTPropertySheet
The code worked before the latest VS 2008 service pack, and now it returns a 0x000000 pointer


-------------
Product: Xtreme ToolkitPro 19.30
Platform: Windows 10 64bit
Language: Visual C++ (VS 2019)


Posted By: evoX
Date Posted: 17 October 2009 at 11:10pm

int i=this->GetPageCount(); // this returns 8 in my application and 5 in tabmanager

CXTPPropertyPage* prop=this->GetPage(0); // this returns a valid page

CXTPPropertyPage* prop2=this->GetPage(1); // this returns 0x0000000 (null hwnd)



-------------
Product: Xtreme ToolkitPro 19.30
Platform: Windows 10 64bit
Language: Visual C++ (VS 2019)


Posted By: evoX
Date Posted: 17 October 2009 at 11:16pm
I have modified the TabManager sample so that you can see the problem in PropertiesDialog.cpp  -> CPropertiesDialog::OnInitDialog()
http://forum.codejock.com/uploads/20091017_231629_TabManager.rar - uploads/20091017_231629_TabManager.rar


-------------
Product: Xtreme ToolkitPro 19.30
Platform: Windows 10 64bit
Language: Visual C++ (VS 2019)


Posted By: Oleg
Date Posted: 18 October 2009 at 1:33am

Hello,

It returns valid pointer for me. only window for this page is not created. Is it your case too ?
 
its actually feature of 13.1 release - we made it mork same as standard PropetySheet - Page now created only when user fuirst select it. It will increase perfomance when you have some Sheet with f.e 20 pages.
 
as solution you can call CreatePage(prop2); to be sure it is created now.


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


Posted By: evoX
Date Posted: 18 October 2009 at 10:44am
Hi,
   I don't care about the window, but I have variables in each page which caused a crash when I called UpdateData(FALSE);
   Now with CreatePage() works !!! thank you !
 

CPage2FileDisk* pageFileDisk=(CPage2FileDisk*)this->GetPage(1);

pageFileDisk->m_bDelCustomFiles=theApp.GetProfileInt(_T("Items"),_T("DelCustomFiles"),FALSE);

pageFileDisk->UpdateData(FALSE); // This caused a crash
 
now if I add before a CreatePage it does not crash anymore


-------------
Product: Xtreme ToolkitPro 19.30
Platform: Windows 10 64bit
Language: Visual C++ (VS 2019)



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