Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Retreiving the Docking pane status
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Retreiving the Docking pane status

 Post Reply Post Reply
Author
Message
Atul View Drop Down
Newbie
Newbie


Joined: 02 May 2008
Location: India
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Atul Quote  Post ReplyReply Direct Link To This Post Topic: Retreiving the Docking pane status
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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: 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
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.