![]()  | 
 
Panes Layout Load/Save new Pane | 
 
    Post Reply  
   | 
  
| Author | |
   
   jimmy  
   
   Senior Member  
   Joined: 11 November 2003 Location: Austria Status: Offline Points: 516  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: Panes Layout Load/Save new PanePosted: 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  | 
 |
![]()  | 
 |
   
   jimmy  
   
   Senior Member  
   Joined: 11 November 2003 Location: Austria Status: Offline Points: 516  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     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  | 
 |
![]()  | 
 |
   
   spike  
   
   Groupie  
   Joined: 13 May 2003 Location: United States Status: Offline Points: 48  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     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.
    
   
   | 
 |
![]()  | 
 |
   
   rvoith  
   
   Groupie  
   Joined: 03 July 2003 Location: Norway Status: Offline Points: 40  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     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!  | 
 |
![]()  | 
 |
    Post Reply  
   | 
  |
|       
  
  Tweet   	
    | 
 
| Forum Jump | Forum Permissions  ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum  |