Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - FindPane unsuccessful after a DoPropExchange
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

FindPane unsuccessful after a DoPropExchange

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


Joined: 03 November 2005
Location: Canada
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote jansim Quote  Post ReplyReply Direct Link To This Post Topic: FindPane unsuccessful after a DoPropExchange
    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
 
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: 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
Back to Top
jansim View Drop Down
Groupie
Groupie


Joined: 03 November 2005
Location: Canada
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote jansim Quote  Post ReplyReply Direct Link To This Post 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
 
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: 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
Back to Top
jansim View Drop Down
Groupie
Groupie


Joined: 03 November 2005
Location: Canada
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote jansim Quote  Post ReplyReply Direct Link To This Post Posted: 27 July 2006 at 4:32pm
Thank you!
 
Just wanted to make sure it was the best solution
 
Jansim
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.063 seconds.