Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Panes Layout Load/Save new Pane
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Panes Layout Load/Save new Pane

 Post Reply Post Reply
Author
Message
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 515
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post Topic: Panes Layout Load/Save new Pane
    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
Back to Top
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 515
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
spike View Drop Down
Groupie
Groupie


Joined: 13 May 2003
Location: United States
Status: Offline
Points: 48
Post Options Post Options   Thanks (0) Thanks(0)   Quote spike Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
rvoith View Drop Down
Groupie
Groupie
Avatar

Joined: 03 July 2003
Location: Norway
Status: Offline
Points: 40
Post Options Post Options   Thanks (0) Thanks(0)   Quote rvoith Quote  Post ReplyReply Direct Link To This Post 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!
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.172 seconds.