Print Page | Close Window

Retreiving the Docking pane status

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=14860
Printed Date: 31 January 2025 at 9:45am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Retreiving the Docking pane status
Posted By: Atul
Subject: Retreiving the Docking pane status
Date Posted: 29 July 2009 at 8:52am
Hi,
     I am having Docking panes in my application. Now I want my application to remember the status of the docking panes(which one is active, it's co-ordinates etc) when i close the session, and retrieve the status back, when a new session launches. While searching, i came across a XTPDockingPaneLayout class.

In my Mainframe.cpp I do :

m_paneManager.AttachPane(pwndPane2 , pwndPane1);
m_paneManager.AttachPane(pwndPane3 , pwndPane1);
m_paneManager.AttachPane(pwndPane7 , pwndPane1);

// Load the previous state for docking panes.
CXTPDockingPaneLayout layoutNormal(&m_paneManager);
// I do call the Load function
BOOL is_layout_loaded = layoutNormal.Load(_T("NormalLayout"));
// this returns success.

But i don't get the status of the docking panes right.
I do 

CMainFrame::~CMainFrame()
{
// Saving the layout when the application is terminating ... Atul.V 29th July 2009
CXTPDockingPaneLayout layoutNormal(&m_paneManager);
layoutNormal.Save(_T("NormalLayout"));
}

Am i missing anything ?
I am using XTP 13.0.0.

Thanks in Advance,
Atul



Replies:
Posted By: Oleg
Date Posted: 30 July 2009 at 2:23am
Just copy it from samples:
 
// Load the previous state for docking panes.
 CXTPDockingPaneLayout layoutNormal(&m_paneManager);
 if (layoutNormal.Load(_T("NormalLayout")))
 {
  m_paneManager.SetLayout(&layoutNormal);
 }
 
...
 
 // Save the current state for docking panes.
 CXTPDockingPaneLayout layoutNormal(&m_paneManager);
 m_paneManager.GetLayout(&layoutNormal);
 layoutNormal.Save(_T("NormalLayout"));
 


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



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