Panes Layout Load/Save new Pane
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=891
Printed Date: 09 May 2024 at 8:44pm Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: Panes Layout Load/Save new Pane
Posted By: jimmy
Subject: Panes Layout Load/Save new Pane
Date Posted: 25 June 2004 at 4:40am
Hello,
i have a program with panes.
With layout load/save i load/save the pane configuration.
After i add a new pane and call layout load/setlayout, the new pane will be destroy.
Why ?
i think correct is, hide the pane.
Jimmy
|
Replies:
Posted By: jimmy
Date Posted: 25 June 2004 at 4:59am
More Info
GetDockingPaneManager()->CreatePane(IDC_PANE1, CRect(0,0,200,300), dockBottomOf, NULL);
GetDockingPaneManager()->CreatePane(IDC_PANE2, CRect(0,0,200,300), dockBottomOf, NULL);
// here GetDockingPaneManager()->CreatePane(IDC_PANE3, CRect(0,0,200,300), dockBottomOf, NULL);
m_pDefaultLayout = GetDockingPaneManager()->CreateLayout();
GetDockingPaneManager()->GetLayout(m_pDefaultLayout);
m_pPaneLayout = GetDockingPaneManager()->CreateLayout();
if (m_pPaneLayout->Load(_T("PaneLayout")))
{
GetDockingPaneManager()->SetLayout(m_pPaneLayout);
}
else
GetDockingPaneManager()->GetLayout(m_pPaneLayout);
--------------------------
Run one.
remove comments.
After SetLayout, the IDC_PANE3 are destroyd.
Jimmy
|
Posted By: spike
Date Posted: 27 June 2004 at 4:39pm
This is a commone "problem". In the event that you add a new Pane to your applicaiton you need to change the name of your "PaneLayout" to like "PanelLayout_v2", "v3", "v4" etc.
|
Posted By: rvoith
Date Posted: 06 July 2004 at 7:22am
..or even better, clean up the old PanelLayout structure in registry, at program launch. You need a version identifier somewhere which control to delete or not. I prefer this vs. creating "PanelLayout_v2" to avoid cluttering the registry too much ...
------------- Best regards,
Bob
Proud Programmer!
|
|