title: CDockablePane does not resize after restarting the program
body: <p>I started a Single Document MFC project and I have created two <code>CDockablePane</code>s.<br>
  The problem I'm having is that if I move or resize the panes and exit the program, their layout does not reset when I restart the program. Their layout stays modified.  </p>
  
  <p>I'm guessing I'm either doing something wrong or there is some code generated by Visual Studio that I'm not finding.   </p>
  
  <p>My <code>CMainFrame::OnCreate</code> function:</p>
  
  <pre><code>// Headers...
  
  #define IDC_MYPANE_1 100
  #define IDC_MYPANE_2 101
  
  int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
  {
      // A lot of pre-generated code...
  
      if (this-&gt;InitMyPane1 () == FALSE) {
          return -1 ;
      }
  
      if (this-&gt;InitMyPane2 () == FALSE) {
          return -1 ;
      }
  
      return 0;   
  }
  </code></pre>
  
  <p>My panel initialization functions:  </p>
  
  <pre><code>BOOL CMainFrame::InitMyPane1 ()
  {
      DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_ALIGN_LEFT | CBRS_FLOAT_MULTI ;
  
      BOOL bOk = m_MyPane1.Create (
          _T ("MyPane 1"), this, 
          CRect (0, 0, 100, 300), TRUE, IDC_MYPANE_1, dwStyle
      ) ;
  
      if (bOk == FALSE) {
          return FALSE ;
      }
  
      m_MyPane1.EnableDocking (CBRS_ALIGN_ANY) ;
      this-&gt;DockPane ((CBasePane *) &amp;m_MyPane1, AFX_IDW_DOCKBAR_LEFT) ;
      this-&gt;RecalcLayout () ;
  
      return bOk ;
  }
  
  BOOL CMainFrame::InitMyPane2 ()
  {
      DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_ALIGN_LEFT | CBRS_FLOAT_MULTI ;
  
      BOOL bOk = m_MyPane2.Create (
          _T ("MyPane 2"), this, 
          CRect (0, 0, 200, 300), TRUE, IDC_MYPANE_2, dwStyle
      ) ;
  
      if (bOk == FALSE) {
          return FALSE ;
      }
  
      m_MyPane2.EnableDocking (CBRS_ALIGN_ANY) ;
      m_MyPane2.DockToWindow (&amp;m_MyPane1, CBRS_ALIGN_RIGHT) ;
  
      this-&gt;RecalcLayout () ;
  
      return bOk ;
  }
  </code></pre>
  
  <p>My <code>OnCreate</code> and <code>OnSize</code> functions for <code>MyPane1</code>:  </p>
  
  <pre><code>int MyPane1::OnCreate (LPCREATESTRUCT lp)
  {
      if (CDockablePane::OnCreate (lp) == -1) {
          return -1 ;
      }
  
      // Creates a CListCtrl for this pane (I have a member CListCtrl.)
      return this-&gt;CreateCListCtrl () ;
  }
  
  void MyPane1::OnSize (UINT nType, int cx, int cy)
  {
      CDockablePane::OnSize (nType, cx, cy) ;
  
      CRect rect ;
      this-&gt;GetClientRect (&amp;rect) ;
  
      m_MyList.SetWindowPos 
          (NULL, rect.left, rect.top, rect.Width (), rect.Height (), SWP_NOACTIVATE) ;
  
      m_MyList.SetColumnWidth (0, LVSCW_AUTOSIZE) ;
      m_MyList.SetColumnWidth (1, LVSCW_AUTOSIZE_USEHEADER) ;
  }
  </code></pre>
  
  <p>My <code>OnCreate</code> and <code>OnSize</code> functions for <code>MyPane2</code>:  </p>
  
  <pre><code>int MyPane2::OnCreate (LPCREATESTRUCT lp)
  {
      if (CDockablePane::OnCreate (lp) == -1) {
          return -1 ;
      }
  
      // Creates a CListCtrl for this pane (I have a member CListCtrl.)
      return this-&gt;CreateCListCtrl () ;   
  }
  
  void MyPane2::OnSize (UINT nType, int cx, int cy)
  {
      CDockablePane::OnSize (nType, cx, cy) ;
  
      CRect rect ;
      this-&gt;GetClientRect (&amp;rect) ;
  
      m_MyList.SetWindowPos 
          (NULL, rect.left, rect.top, rect.Width (), rect.Height (), SWP_NOACTIVATE) ;
  
      m_MyList.SetColumnWidth (0, LVSCW_AUTOSIZE_USEHEADER) ;
      m_MyList.SetColumnWidth (1, LVSCW_AUTOSIZE_USEHEADER) ;
      m_MyList.SetColumnWidth (2, LVSCW_AUTOSIZE_USEHEADER) ;
      m_MyList.SetColumnWidth (3, LVSCW_AUTOSIZE_USEHEADER) ;
      m_MyList.SetColumnWidth (4, LVSCW_AUTOSIZE_USEHEADER) ;
      m_MyList.SetColumnWidth (5, LVSCW_AUTOSIZE_USEHEADER) ;
      m_MyList.SetColumnWidth (6, LVSCW_AUTOSIZE_USEHEADER) ;
      m_MyList.SetColumnWidth (7, LVSCW_AUTOSIZE_USEHEADER) ;
  }
  </code></pre>