Print Page | Close Window

LoadState behavior

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=143
Printed Date: 28 March 2024 at 9:07pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: LoadState behavior
Posted By: Magnetic core
Subject: LoadState behavior
Date Posted: 22 August 2003 at 2:49am

Hello,

Not really a bug, but can be problematic (DockingPane v8.0):

I create a program with 2 panes, then I use DockingPaneLayout to save its layout into the registry. I modify my program to create only the first pane. When a launch the program again, the second pane is still created (I use the DockingPaneLayout to load my panes layout). I have seen in source code that Load function create panes from register values and doesn't take into account the fact that only one pane has been created.

Thanks a lot,

Magnetic core 




Replies:
Posted By: spike
Date Posted: 07 September 2003 at 2:05pm
I have also noticed this problem. Along with another problem when you call LoadState on the DockingPaneLayout. If I create Pane A and Pane B and distribute my application, then decide to modify my application to create Pane C, when LoadState gets called it does not load Pane C into the MainFrame. I guess since it isnt in the registry then it knows nothing about it so it doesnt create it.


Posted By: Oleg
Date Posted: 31 October 2003 at 11:13pm

You must programmaticaly control this:

CXTPDockingPaneLayout layoutNormal(&m_paneManager);
if (layoutNormal.Load(_T("NormalLayout"))) 
{

  // check if we have 3 stored panes
  if (layoutNormal.GetPaneList().GetCount() == 3)
  {
   m_paneManager.SetLayout(&layoutNormal) ; 
  }
 }




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