![]() |
FindPane unsuccessful after a DoPropExchange |
Post Reply
|
| Author | |
jansim
Groupie
Joined: 03 November 2005 Location: Canada Status: Offline Points: 20 |
Post Options
Thanks(0)
Quote Reply
Topic: FindPane unsuccessful after a DoPropExchangePosted: 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.
![]() Thanks
Jean-Simon
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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) |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
jansim
Groupie
Joined: 03 November 2005 Location: Canada Status: Offline Points: 20 |
Post Options
Thanks(0)
Quote Reply
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
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
jansim
Groupie
Joined: 03 November 2005 Location: Canada Status: Offline Points: 20 |
Post Options
Thanks(0)
Quote Reply
Posted: 27 July 2006 at 4:32pm |
|
Thank you!
Just wanted to make sure it was the best solution
Jansim
|
|
![]() |
|
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 |