<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Problem restoring pane positions</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Docking Pane : Problem restoring pane positions]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 07:58:19 +0000</pubDate>
  <lastBuildDate>Wed, 01 Nov 2006 09:16:53 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=5397</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Problem restoring pane positions :   ContactGT wrote: I have worked...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5397&amp;PID=16928&amp;title=problem-restoring-pane-positions#16928</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1801">rmercer</a><br /><strong>Subject:</strong> 5397<br /><strong>Posted:</strong> 01 November 2006 at 9:16am<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by ContactGT" alt="Originally posted by ContactGT" style="vertical-align: text-bottom;" /> <strong>ContactGT wrote:</strong><br /><br /><P>I have worked through the "Add a Docking Pane to your application" tutorial and everything is working perfectly, except for the restore of Pane positions...</P><P>In my MainFrame class I have lines of code like this (for each pane) of these in my header file:</P><P>&nbsp;&nbsp;&nbsp; CXTPDockingPane *pwndProjList;<BR>&nbsp;&nbsp;&nbsp; ProjectListTabCtrl&nbsp; m_wndProjectListWindow;</P><P>And in my OnCreate() method (above the code to restore the layout) I have a number of lines of code like this (for each pane):</P><P>&nbsp;&nbsp;&nbsp; pwndProjList = m_paneManager.CreatePane(IDR_PANE_PROJLIST, CRect(0, 0,200, 250), xtpPaneDockBottom);<BR>&nbsp;&nbsp;&nbsp; m_wndProjectListWindow.Create(TCS_TABS | TCS_FIXEDWIDTH | WS_CHILD | WS_VISIBLE, CRect(0,0,0,0), this, IDGT_PROJ_LIST_WND);<BR>&nbsp;&nbsp;&nbsp; pwndProjList-&gt;Attach(&amp;m_wndProjectListWindow);</P><P><BR>This creates a pane containing a list control.</P><P><BR>I have added the following code to my OnCreate() method after the above code:</P><P>&nbsp;&nbsp;&nbsp; // Load the previous state for docking panes.<BR>&nbsp;&nbsp;&nbsp; CXTPDockingPaneLayout layoutNormal(&amp;m_paneManager);<BR>&nbsp;&nbsp;&nbsp; if (layoutNormal.Load(_T("NormalLayout")))<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_paneManager.SetLayout(&amp;layoutNormal);<BR>&nbsp;&nbsp;&nbsp; }</P><P><BR>And in my OnClose method I have added the following code:</P><P>&nbsp;&nbsp;&nbsp; // Save the current state for docking panes.<BR>&nbsp;&nbsp;&nbsp; CXTPDockingPaneLayout layoutNormal(&amp;m_paneManager);<BR>&nbsp;&nbsp;&nbsp; m_paneManager.GetLayout(&amp;layoutNormal);<BR>&nbsp;&nbsp;&nbsp; layoutNormal.Save(_T("NormalLayout"));</P><DIV><BR>If I include the layoutNormal code above, then the panes move to exactly where I left them, but their contents all disappear (all panes just go grey). If I remove the layoutNormal code, then the panes have content, but appear in the default positions (obviously). Am I going about restoring the pane positions in the wrong way? How do I get my content to display back?</DIV></td></tr></table> <DIV>Do you also have an OnDockingPaneNotify handler to process XTP_DPN_SHOWWINDOW ?</DIV><DIV>&nbsp;</DIV><DIV>Based off your example it would be something along the lines of:</DIV><DIV>&nbsp;</DIV><DIV><FONT size=2><DIV>&nbsp;</DIV><DIV>LRESULT CMainFrame::OnDockingPaneNotify(WPARAM wParam, LPARAM lParam)</DIV><DIV>{</DIV></FONT></DIV><DIV>&nbsp; if (wParam == XTP_DPN_SHOWWINDOW)</DIV><DIV>&nbsp; {</DIV><DIV>&nbsp; &nbsp;&nbsp;CXTPDockingPane *p_pane = (CXTPDockingPane*)lParam;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp; &nbsp; if (!p_pane-&gt;IsValid())</DIV><DIV>&nbsp; &nbsp; {</DIV><DIV>&nbsp;&nbsp;&nbsp; &nbsp; switch (p_pane-&gt;GetID())</DIV><DIV>&nbsp; &nbsp;&nbsp;&nbsp; {</DIV><DIV>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case IDR_PANE_PROJLIST:</DIV><DIV>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p_pane-&gt;Attach((CWnd*)&amp;m_wndProjectListWindow);</DIV><DIV>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;}</DIV><DIV>&nbsp;</DIV><DIV>&nbsp; &nbsp; }</DIV><DIV>&nbsp;&nbsp;&nbsp; return TRUE;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp; }</DIV><DIV>&nbsp; return FALSE;</DIV><DIV>&nbsp;</DIV><DIV>}</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 01 Nov 2006 09:16:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5397&amp;PID=16928&amp;title=problem-restoring-pane-positions#16928</guid>
  </item> 
  <item>
   <title><![CDATA[Problem restoring pane positions : I have worked through the &amp;#034;Add...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5397&amp;PID=16924&amp;title=problem-restoring-pane-positions#16924</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2461">ContactGT</a><br /><strong>Subject:</strong> 5397<br /><strong>Posted:</strong> 01 November 2006 at 6:56am<br /><br /><P>I have worked through the "Add a Docking Pane to your application" tutorial and everything is working perfectly, except for the restore of Pane positions...</P><P>In my MainFrame class I have lines of code like this (for each pane) of these in my header file:</P><P>&nbsp;&nbsp;&nbsp; CXTPDockingPane *pwndProjList;<BR>&nbsp;&nbsp;&nbsp; ProjectListTabCtrl&nbsp; m_wndProjectListWindow;</P><P>And in my OnCreate() method (above the code to restore the layout) I have a number of lines of code like this (for each pane):</P><P>&nbsp;&nbsp;&nbsp; pwndProjList = m_paneManager.CreatePane(IDR_PANE_PROJLIST, CRect(0, 0,200, 250), xtpPaneDockBottom);<BR>&nbsp;&nbsp;&nbsp; m_wndProjectListWindow.Create(TCS_TABS | TCS_FIXEDWIDTH | WS_CHILD | WS_VISIBLE, CRect(0,0,0,0), this, IDGT_PROJ_LIST_WND);<BR>&nbsp;&nbsp;&nbsp; pwndProjList-&gt;Attach(&amp;m_wndProjectListWindow);</P><P><BR>This creates a pane containing a list control.</P><P><BR>I have added the following code to my OnCreate() method after the above code:</P><P>&nbsp;&nbsp;&nbsp; // Load the previous state for docking panes.<BR>&nbsp;&nbsp;&nbsp; CXTPDockingPaneLayout layoutNormal(&amp;m_paneManager);<BR>&nbsp;&nbsp;&nbsp; if (layoutNormal.Load(_T("NormalLayout")))<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_paneManager.SetLayout(&amp;layoutNormal);<BR>&nbsp;&nbsp;&nbsp; }</P><P><BR>And in my OnClose method I have added the following code:</P><P>&nbsp;&nbsp;&nbsp; // Save the current state for docking panes.<BR>&nbsp;&nbsp;&nbsp; CXTPDockingPaneLayout layoutNormal(&amp;m_paneManager);<BR>&nbsp;&nbsp;&nbsp; m_paneManager.GetLayout(&amp;layoutNormal);<BR>&nbsp;&nbsp;&nbsp; layoutNormal.Save(_T("NormalLayout"));</P><DIV><BR>If I include the layoutNormal code above, then the panes move to exactly where I left them, but their contents all disappear (all panes just go grey). If I remove the layoutNormal code, then the panes have content, but appear in the default positions (obviously). Am I going about restoring the pane positions in the wrong way? How do I get my content to display back?</DIV>]]>
   </description>
   <pubDate>Wed, 01 Nov 2006 06:56:28 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5397&amp;PID=16924&amp;title=problem-restoring-pane-positions#16924</guid>
  </item> 
 </channel>
</rss>