Print Page | Close Window

FindPane unsuccessful after a DoPropExchange

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=4665
Printed Date: 11 November 2025 at 12:19am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: FindPane unsuccessful after a DoPropExchange
Posted By: jansim
Subject: FindPane unsuccessful after a DoPropExchange
Date Posted: 26 July 2006 at 5:44pm

I have a layout file containing 2 panes

"Pane 1" and "Pane 2"
 
When I start my application, I create 3 panes
 
"Pane 1", "Pane 2" and "Pane 3"
 
When I load the layout, the third pane is deleted
from the panes list by the DoPropExchange method.
 
What is the best way to correct the problem?
 
I noticed an InternalRelease is called on "Pane 3"
in the Free() method of the PaneLayout.
 
Does that mean I have to re-create my "Pane 3"
using CreatePane ?
 
Maybe I'm missing something.Confused
 
Thanks
Jean-Simon
 



Replies:
Posted By: Oleg
Date Posted: 27 July 2006 at 10:21am
Hello, you can pane's count before restore layout or change profile section for next layout.
 
 
CXTPDockingPaneLayout layoutNormal(GetDockingPaneManager());

 if (layoutNormal.Load(_T("NormalLayout")) && layoutNormal.GetPaneList().GetCount() == 3)
 {
  GetDockingPaneManager()->SetLayout(&layoutNormal);
 }



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


Posted By: jansim
Date Posted: 27 July 2006 at 11:01am

Hi Oleg,

Thanks for the reply.
This solution seems to reset the layout to the default layout
if there is one missing pane in the layout.
 
This is exactly what I need not to do.
 
I will explain my problem better:
 
In version 10.0 our our software, we have 2 panes.
In version 10.1, we will have 3 panes.
 
We absolutely need to be backward compatible with
docking pane layout.
 
So, when application 10.1 starts, it creates 3 panes,
the user loads a layout from 10.0, where the third pane
does not exist. We need to make the new pane "floating"
but we need not to touch the other panes.
 
Is there a better solution than this:
 
CXTPDockingPaneLayout currentLayout(GetDockingPaneManager());
 
if (currentLayout.Load(_T("LayoutFrom10.0")) && currentLayout.GetPaneList().GetCount() != 3)
{
   // Some code to check what panes is missing
   ...
  
   CXTPDockignPane* pMissingPane = GetDockingPaneManager()->CreatePane( ... );
 
   // Then make the pane floating
   ...
}
 
Thank you
Jean-Simon
 


Posted By: Oleg
Date Posted: 27 July 2006 at 2:35pm
Hi,
What bad in solution you wrote? 
 
right - you can check number of pane, restore layout and add one floating pane.


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


Posted By: jansim
Date Posted: 27 July 2006 at 4:32pm
Thank you!
 
Just wanted to make sure it was the best solution
 
Jansim



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