![]() |
CXTPPropertySheet GetPage problem |
Post Reply ![]() |
Author | |
evoX ![]() Senior Member ![]() ![]() Joined: 25 July 2007 Status: Offline Points: 207 |
![]() ![]() ![]() ![]() ![]() 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) |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Difficult to say without sample to debug. check what value returns GetPageCount();
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
evoX ![]() Senior Member ![]() ![]() Joined: 25 July 2007 Status: Offline Points: 207 |
![]() ![]() ![]() ![]() ![]() |
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) |
|
![]() |
|
evoX ![]() Senior Member ![]() ![]() Joined: 25 July 2007 Status: Offline Points: 207 |
![]() ![]() ![]() ![]() ![]() |
int i=this->GetPageCount(); // this returns 8 in my application and 5 in tabmanagerCXTPPropertyPage* prop= this->GetPage(0); // this returns a valid pageCXTPPropertyPage* prop2= this->GetPage(1); // this returns 0x0000000 (null hwnd) |
|
Product: Xtreme ToolkitPro 19.30
Platform: Windows 10 64bit Language: Visual C++ (VS 2019) |
|
![]() |
|
evoX ![]() Senior Member ![]() ![]() Joined: 25 July 2007 Status: Offline Points: 207 |
![]() ![]() ![]() ![]() ![]() |
I have modified the TabManager sample so that you can see the problem in PropertiesDialog.cpp -> CPropertiesDialog::OnInitDialog()
|
|
Product: Xtreme ToolkitPro 19.30
Platform: Windows 10 64bit Language: Visual C++ (VS 2019) |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
evoX ![]() Senior Member ![]() ![]() Joined: 25 July 2007 Status: Offline Points: 207 |
![]() ![]() ![]() ![]() ![]() |
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) |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |