<?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 : Redocking Tab windows</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Redocking Tab windows]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 25 May 2026 05:06:35 +0000</pubDate>
  <lastBuildDate>Tue, 06 Sep 2022 15:08:09 +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=24323</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[Redocking Tab windows : Thanks again Fredrik, your answer...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24323&amp;PID=78523&amp;title=redocking-tab-windows#78523</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9498">xsensordev</a><br /><strong>Subject:</strong> 24323<br /><strong>Posted:</strong> 06 September 2022 at 3:08pm<br /><br /><div>Thanks again Fredrik, your answer basically confirmed that there is no method to undo the tiling. This freed me to make my own.</div><div><br></div><div>In the case where tearoffs are not used. (ie: CMainFrame is derived from CXTPMDIFrameWnd and _MTIClientWnd.EnableTearOff() is not called:</div><div>&nbsp;</div><div>Toggling between MDI tiled and tabbed is as easy as:</div><div><table width="99%"><tr><td><pre class="BBcode"></div><div><div>void CXsensorView::OnTestToggle()</div><div>{</div><div>&nbsp; &nbsp; static bool toggle = false;</div><div>&nbsp; &nbsp; if (!toggle)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;GETMAINFRAME()-&gt;GetTabClientWnd()-&gt;MDITile(TRUE);</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp; else</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;GETMAINFRAME()-&gt;GetTabClientWnd()-&gt;Detach();</div><div>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;GETMAINFRAME()-&gt;GetTabClientWnd()-&gt;Attach(GETMAINFRAME(), TRUE);</div><div>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;GETMAINFRAME()-&gt;GetTabClientWnd()-&gt;ShowWorkspace(TRUE);</div><div>&nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; toggle = !toggle;</div><div>}</div></div><div></pre></td></tr></table></div><div><br></div><div><br></div><div>In the case where tearoffs are used, (ie: CXTPMDIFrameWndEx), I rolled my own solution with the following toolkit modifications:</div><div><br></div><div><table width="99%"><tr><td><pre class="BBcode"></div><div><div>public:</div><div>void CXTPMDIFrameWndEx::RedockAllTearoffs()</div><div>{</div><div>&nbsp; &nbsp; CArray&lt;CXTPTabClientWnd*, CXTPTabClientWnd*&gt; tabClients;</div><div><br></div><div>&nbsp; &nbsp; CXTPTabClientWnd* pTabClient = GetTabClientWnd();</div><div>&nbsp; &nbsp; if(pTabClient == nullptr)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; return;</div><div><br></div><div>&nbsp; &nbsp; if(pTabClient-&gt;GetWorkspaceCount() == 0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; return;</div><div><br></div><div>&nbsp; &nbsp; pTabClient-&gt;GetTabClients(tabClients);</div><div><br></div><div>&nbsp; &nbsp; for (int i = 0; i &lt; tabClients.GetSize(); i++)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if (pTabClient != tabClients.GetAt(i))</div><div>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;{</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;CXTPTearOffFrame* pTearOffFrame =</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;DYNAMIC_DOWNCAST(CXTPTearOffFrame, tabClients.GetAt(i)-&gt;GetParentFrame());</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;if (pTearOffFrame != nullptr)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;pTearOffFrame-&gt;RedockWorkSpace(pTabClient);</div><div>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;}</div><div>&nbsp; &nbsp; }</div><div>}</div><div><br></div><div>public:</div><div>void CXTPTearOffFrame::RedockWorkSpace(CXTPTabClientWnd* pTarget)</div><div>{</div><div>&nbsp; &nbsp; ChangeMDIChildFrame(pTarget, 0, xtpTabClientStickerCenter);</div><div>}</div><div><br></div><div>void CXsensorView::OnTestToggle()</div><div>{</div><div>&nbsp; &nbsp; static bool toggle = false;</div><div>&nbsp; &nbsp; if (!toggle)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;GETMAINFRAME()-&gt;GetTabClientWnd()-&gt;MDITile(TRUE);</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp; else</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;GETMAINFRAME()-&gt;RedockAllTearoffs();</div><div><br></div><div>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;GETMAINFRAME()-&gt;GetTabClientWnd()-&gt;Detach();</div><div>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;GETMAINFRAME()-&gt;GetTabClientWnd()-&gt;Attach(GETMAINFRAME(), TRUE);</div><div>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;GETMAINFRAME()-&gt;GetTabClientWnd()-&gt;ShowWorkspace(TRUE);</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp; toggle = !toggle;</div><div>}</div></div><div></pre></td></tr></table></div>]]>
   </description>
   <pubDate>Tue, 06 Sep 2022 15:08:09 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24323&amp;PID=78523&amp;title=redocking-tab-windows#78523</guid>
  </item> 
  <item>
   <title><![CDATA[Redocking Tab windows : Thank you Fredrik, that sets me...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24323&amp;PID=78522&amp;title=redocking-tab-windows#78522</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9498">xsensordev</a><br /><strong>Subject:</strong> 24323<br /><strong>Posted:</strong> 06 September 2022 at 12:23pm<br /><br />Thank you Fredrik, that sets me off in a good direction!]]>
   </description>
   <pubDate>Tue, 06 Sep 2022 12:23:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24323&amp;PID=78522&amp;title=redocking-tab-windows#78522</guid>
  </item> 
  <item>
   <title><![CDATA[Redocking Tab windows : You have maximize the active frame...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24323&amp;PID=78521&amp;title=redocking-tab-windows#78521</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1263">Fredrik</a><br /><strong>Subject:</strong> 24323<br /><strong>Posted:</strong> 06 September 2022 at 9:05am<br /><br />You have maximize the active frame window and then call ShowWorkspace(TRUE) on your CXTPTabClientWnd member.<br><br>They way I have solved it is to implement OnSysCommand for my CMDIChildWnds. If the mdi frames gets maximized, then I show tabs, otherwise the tabs are hidden. You may want to always see the tabs of course.<br><br><table width="99%"><tr><td><pre class="BBcode"><br><div>void MyMDIChildWnd::OnSysCommand(UINT nID, LPARAM lParam)</div><div>{</div><div>&nbsp; &nbsp;const auto pMainFrame = static_cast&lt;MyMainFrame*&gt;(AfxGetMainWnd());</div><div><br></div><div>&nbsp; &nbsp;if ((nID &amp; 0xFFF0) == SC_MAXIMIZE) // Show tabs</div><div>&nbsp; &nbsp; &nbsp; pMainFrame-&gt;GetTabClientWnd().ShowWorkspace&nbsp;(TRUE);</div><div>&nbsp; &nbsp;else if ((nID &amp; 0xFFF0) == SC_MINIMIZE || (nID &amp; 0xFFF0) == SC_RESTORE) // Hide tabs</div><div>&nbsp; &nbsp; &nbsp; pMainFrame-&gt;GetTabClientWnd().ShowWorkspace&nbsp;(FALSE);</div><div><br></div><div>&nbsp; &nbsp;CMDIChildWnd::OnSysCommand(nID, lParam);</div><div>}<br></pre></td></tr></table><br><br>But you will also need to add code when the last frame window is closed to hide the workspace, and then also to hide the workspace when you cascade, restore and tile windows. I also had to add code to close frame windows with middle mouse button and double click to maxmi<br><br></div>]]>
   </description>
   <pubDate>Tue, 06 Sep 2022 09:05:20 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24323&amp;PID=78521&amp;title=redocking-tab-windows#78521</guid>
  </item> 
  <item>
   <title><![CDATA[Redocking Tab windows : I was wrong when I thought being...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24323&amp;PID=78520&amp;title=redocking-tab-windows#78520</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9498">xsensordev</a><br /><strong>Subject:</strong> 24323<br /><strong>Posted:</strong> 04 September 2022 at 7:29pm<br /><br />I was wrong when I thought being an active subscriber would at least get a comment from the developer.<div><br></div><div>Oh well. Guess not every developer is attentive to their clients as I am.</div><div><br></div>]]>
   </description>
   <pubDate>Sun, 04 Sep 2022 19:29:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24323&amp;PID=78520&amp;title=redocking-tab-windows#78520</guid>
  </item> 
  <item>
   <title><![CDATA[Redocking Tab windows : SoCXTPTabClientWnd::MDITile can...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24323&amp;PID=78516&amp;title=redocking-tab-windows#78516</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9498">xsensordev</a><br /><strong>Subject:</strong> 24323<br /><strong>Posted:</strong> 29 August 2022 at 5:44pm<br /><br />So&nbsp;CXTPTabClientWnd::MDITile can be used to programmatically tile tab clients when grouping is enabled.<div><br></div><div>Is there a way to programmatically undo this tiling and place all the clients back in the tab bar?</div><div><br></div><div>This is with ToolkitPro V20.3.0</div>]]>
   </description>
   <pubDate>Mon, 29 Aug 2022 17:44:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24323&amp;PID=78516&amp;title=redocking-tab-windows#78516</guid>
  </item> 
 </channel>
</rss>