title: CDockablePane doesn't save layout when it's docked to another pane
body: <p>In an MFC application, I've got two derived CDockablePane pane objects docked to either side of the main view.</p>
  
  <p>Here is the code to create one of the panes. The second is similar.</p>
  
  <pre><code>if(m_dlgPane &amp;&amp; m_dlgPane-&gt;GetSafeHwnd())
  {
      m_dlgPane-&gt;ShowPane(TRUE,FALSE,TRUE);
      //RecalcLayout();
      return ;
  }
  m_dlgPane = new CDialogPane; 
  ((CDialogPane*)m_dlgPane)-&gt;m_wndDlg = new CPaneChildDlg();
  ((CDialogPane*)m_dlgPane)-&gt;nDlgID = CPaneChildDlg::IDD;
  
  UINT style = WS_CHILD | CBRS_RIGHT | CBRS_FLOAT_MULTI;
  CString strTitle = _T("Child Dialog Pane");
  if (!m_dlgPane-&gt;Create(strTitle, this, CRect(0, 0, 300, 400), TRUE,
      IDC_DIALOG_PANE, style,AFX_CBRS_OUTLOOK_TABS))
  {
      TRACE0("Failed to create dialog pane\n");
      SAFE_DELETE(m_dlgPane);
      return ; 
  }
  m_dlgPane-&gt;EnableDocking(CBRS_ALIGN_ANY);
  DockPane((CBasePane*)m_dlgPane,AFX_IDW_DOCKBAR_RIGHT);
  
  m_dlgPane-&gt;ShowPane(TRUE, FALSE, TRUE);
  m_dlgPane-&gt;RecalcLayout();
  </code></pre>
  
  <p>The layouts are saved by windows through LoadState &amp; SaveState methods. And are called by the framework.</p>
  
  <pre><code>BOOL CDialogPane::SaveState(LPCTSTR lpszProfileName, int nIndex, UINT uiID)
  {
      return CDockablePane::SaveState(lpszProfileName, nIndex, uiID);
  }
  
  BOOL CDialogPane::LoadState(LPCTSTR lpszProfileName, int nIndex, UINT uiID)
  {
      return CDockablePane::LoadState(lpszProfileName, nIndex, uiID); 
  }
  </code></pre>
  
  <p>The layouts loaded properly each time application launches. Apart from when one pane(Pane2) is docked to the other one(Pane1). It seems that it doesn't remember or load the correct height of the Pane2. Although this works throughout the application lifetime but not when the application exists and opens again. </p>