<?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 : Saving MDI layout</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Saving MDI layout]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 19 Apr 2026 06:57:15 +0000</pubDate>
  <lastBuildDate>Wed, 05 Dec 2012 22:38:37 +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=19659</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[Saving MDI layout : Thanks for the reply Graham. I&amp;#039;ve...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19659&amp;PID=69362&amp;title=saving-mdi-layout#69362</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=7436">Andyman</a><br /><strong>Subject:</strong> 19659<br /><strong>Posted:</strong> 05 December 2012 at 10:38pm<br /><br />Thanks for the reply Graham. I've only just got around to trying out your suggestion (6 months later, ha!), but I can't get it to work. I was kind of hoping to use the property exchange stuff to save and restore also, but no luck with that either.&nbsp;<div><br></div><div>I tried modifying "XtremeToolkit\Samples\ToolkitPro\MDITabWindow" as below...<br><div><br></div><div><div>Left file: C:\Users\amanessis\AppData\Local\Temp\Rar$DR89.840\Samples\ToolkitPro\MDITabWindow\bncvw.cpp</div><div>Right file: C:\Source\XtremeToolkit\Samples\ToolkitPro\MDITabWindow\bncvw.cpp</div><div>354a355</div><div>&gt; static CString str;&nbsp;</div><div>359,367c360,372</div><div>&lt;&nbsp;</div><div>&lt; <span ="Apple-tab-span" style="white-space:pre">	</span>CColorDialog dlgColor(pDoc-&gt;m_clrBall);</div><div>&lt; <span ="Apple-tab-span" style="white-space:pre">	</span>if (dlgColor.DoModal() == IDOK)</div><div>&lt; <span ="Apple-tab-span" style="white-space:pre">	</span>{</div><div>&lt; <span ="Apple-tab-span" style="white-space:pre">		</span>pDoc-&gt;SetCustomBallColor(dlgColor.GetColor());</div><div>&lt; <span ="Apple-tab-span" style="white-space:pre">		</span>pDoc-&gt;ClearAllColors();</div><div>&lt; <span ="Apple-tab-span" style="white-space:pre">		</span>pDoc-&gt;m_bCustom = TRUE;</div><div>&lt; <span ="Apple-tab-span" style="white-space:pre">		</span>MakeNewBall();</div><div>&lt; <span ="Apple-tab-span" style="white-space:pre">	</span>}</div><div>---</div><div>&gt; &nbsp;&nbsp;</div><div>&gt; &nbsp; /// TEST STUFF...</div><div>&gt; &nbsp;&nbsp;</div><div>&gt; &nbsp; CMainFrame *f = (CMainFrame*)AfxGetMainWnd ();</div><div>&gt; &nbsp; CXTPDockingPaneManager *manager = &amp;f-&gt;m_paneManager;</div><div>&gt; &nbsp; CXTPPropExchangeXMLNode px(FALSE, 0, _T("Settings"));</div><div>&gt; &nbsp; if (px.OnBeforeExchange())&nbsp;</div><div>&gt; &nbsp; &nbsp; {</div><div>&gt; &nbsp; &nbsp; CXTPPropExchangeSection custom(px.GetSection(_T("CustomLayout")));</div><div>&gt; &nbsp; &nbsp; CXTPPropExchangeSection pxDockingPane(custom-&gt;GetSection(_T("DockingPane")));<span ="Apple-tab-span" style="white-space:pre">	</span></div><div>&gt; &nbsp; &nbsp; manager-&gt;DoPropExchange(&amp;pxDockingPane);</div><div>&gt; &nbsp; &nbsp; str = px.GetEncodedXML();</div><div>&gt; &nbsp; &nbsp; }</div><div>469c474,495</div><div>&lt;&nbsp;</div><div>---</div><div>&gt;&nbsp;</div><div>&gt; &nbsp; // TEST STUFF...</div><div>&gt;&nbsp;</div><div>&gt; &nbsp; CXTPPropExchangeXMLNode px(TRUE, 0, _T("Settings"));</div><div>&gt; &nbsp; px.LoadFromEncodedString(str);</div><div>&gt; &nbsp; if (px.OnBeforeExchange())&nbsp;</div><div>&gt; &nbsp; &nbsp; {</div><div>&gt; &nbsp; &nbsp; CXTPPropExchangeSection sec(px.GetSection(_T("CustomLayout"))); &nbsp;</div><div>&gt; &nbsp; &nbsp; CMainFrame *f = (CMainFrame*)AfxGetMainWnd ();</div><div>&gt; &nbsp; &nbsp; CXTPDockingPaneManager *manager = &amp;f-&gt;m_paneManager;</div><div>&gt; &nbsp; &nbsp; CXTPPropExchangeXMLNode px(TRUE, 0, _T("Settings"));</div><div>&gt; &nbsp; &nbsp; if (px.OnBeforeExchange())&nbsp;</div><div>&gt; &nbsp; &nbsp; &nbsp; {</div><div>&gt; &nbsp; &nbsp; &nbsp; CXTPPropExchangeSection custom(px.GetSection(_T("CustomLayout")));</div><div>&gt; &nbsp; &nbsp; &nbsp; CXTPPropExchangeSection pxDockingPane(custom-&gt;GetSection(_T("DockingPane")));<span ="Apple-tab-span" style="white-space:pre">	</span></div><div>&gt; &nbsp; &nbsp; &nbsp; manager-&gt;DoPropExchange(&amp;pxDockingPane);</div><div>&gt; &nbsp; &nbsp; &nbsp; manager-&gt;RecalcFramesLayout();</div><div>&gt; &nbsp; &nbsp; &nbsp; manager-&gt;RedrawWindow();</div><div>&gt; &nbsp; &nbsp; &nbsp; manager-&gt;RedrawPanes ();</div><div>&gt; &nbsp; &nbsp; &nbsp; }</div><div>&gt; &nbsp; &nbsp; }</div><div>&gt; &nbsp; return;&nbsp;</div></div><div><br></div></div>]]>
   </description>
   <pubDate>Wed, 05 Dec 2012 22:38:37 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19659&amp;PID=69362&amp;title=saving-mdi-layout#69362</guid>
  </item> 
  <item>
   <title><![CDATA[Saving MDI layout : Yes it is. You hammer through...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19659&amp;PID=68013&amp;title=saving-mdi-layout#68013</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5642">grahamf</a><br /><strong>Subject:</strong> 19659<br /><strong>Posted:</strong> 18 April 2012 at 11:05am<br /><br />Yes it is. You hammer through the document list and save the document/frame/view information for each. This is a snippet of what our XML 'workspace' file looks like:<br><br>&lt;Documents Count="2"&gt;<br>&nbsp; &lt;Document0 docpath=".\\ELB Sale Pad 2.ksp" docguid="&lt;docprogid1&gt;" doctitle="ELB Sale Pad 2.ksp" docapplet="Sale Pad"&gt;<br>&nbsp;&nbsp;&nbsp; &lt;Frames Count="1"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Frame0 paneid="0"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Placement showcmd="1" minposition="-1, -1" maxposition="-4, -23" normalposition="0, -8, 1019, 268"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Views Count="1"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;View0 isactive="0" isvisible="1"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Views&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Frame0&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/Frames&gt;<br>&nbsp; &lt;/Document0&gt;<br>&nbsp; &lt;Document1 docpath=".\\ELB Analysis Pad 2.kap" docguid="&lt;docprogid2&gt;" doctitle="ELB Analysis Pad 2.kap" docapplet="Analysis Pad"&gt;<br>&nbsp;&nbsp;&nbsp; &lt;Frames Count="1"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Frame0 paneid="0"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Placement showcmd="1" minposition="-1, -1" maxposition="-1, -1" normalposition="1, 266, 1020, 591"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Views Count="1"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;View0 isactive="1" isvisible="1"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Views&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Frame0&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/Frames&gt;<br>&nbsp; &lt;/Document1&gt;<br>&lt;/Documents&gt;<br><br>The Placement tag is done by deriving a new class from CXTPWindowPos that serialises via DoPropExchange() - why that is there I don't know...<br><br>The docguid attribute is the document template progid-like string - necessary only if you use multiple document templates.<br><br>The paneid attribute is necessary only if you dock CView derivatives.<br><br>The only other thing to note is the path is saved relative to the 'workspace' file itself - that way they can all be picked up and moved/copied to other directories without having to worry about absolute path nonsense.<br><br>]]>
   </description>
   <pubDate>Wed, 18 Apr 2012 11:05:09 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19659&amp;PID=68013&amp;title=saving-mdi-layout#68013</guid>
  </item> 
  <item>
   <title><![CDATA[Saving MDI layout :   Hey Guys Is it possible to...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19659&amp;PID=68001&amp;title=saving-mdi-layout#68001</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=7436">Andyman</a><br /><strong>Subject:</strong> 19659<br /><strong>Posted:</strong> 17 April 2012 at 4:19am<br /><br /><div>Hey Guys<div> </div><div>Is it possible to save and restore the layout of an MDI application. Eg. In the GUI_VisualStudio example to be able to restore the 3 new view tabs....</div></div><div>&nbsp;</div><div>Cheers</div><div>&nbsp;</div><img src="uploads/7436/MDI.png" height="340" width="600" border="0" /><div>&nbsp;</div><div>&nbsp;</div>]]>
   </description>
   <pubDate>Tue, 17 Apr 2012 04:19:02 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19659&amp;PID=68001&amp;title=saving-mdi-layout#68001</guid>
  </item> 
 </channel>
</rss>