<?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 : MDI Tabs - Ensure Visible</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : MDI Tabs - Ensure Visible]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 06:41:03 +0000</pubDate>
  <lastBuildDate>Fri, 06 Feb 2004 07:56:18 +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=286</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[MDI Tabs - Ensure Visible : Hi vladsch, Thank you for the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=286&amp;PID=975&amp;title=mdi-tabs-ensure-visible#975</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=260">Boyd</a><br /><strong>Subject:</strong> 286<br /><strong>Posted:</strong> 06 February 2004 at 7:56am<br /><br /><P>Hi vladsch,</P><P>Thank you for the detailed information about your implementation.&nbsp; Unfortunately, I'm using the ActiveX version and don't have access to the source code.&nbsp; Looks like I'll have to wait for 8.62 release.&nbsp; Thanks anyway! <IMG src="http://forum.codejock.com/smileys/smiley2.gif" border="0"></P>]]>
   </description>
   <pubDate>Fri, 06 Feb 2004 07:56:18 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=286&amp;PID=975&amp;title=mdi-tabs-ensure-visible#975</guid>
  </item> 
  <item>
   <title><![CDATA[MDI Tabs - Ensure Visible : Hi Boyd: I don&amp;#039;t know if...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=286&amp;PID=970&amp;title=mdi-tabs-ensure-visible#970</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=350">vladsch</a><br /><strong>Subject:</strong> 286<br /><strong>Posted:</strong> 05 February 2004 at 8:30pm<br /><br /><P>Hi Boyd:</P><P>I don't know if you are still looking for this functionality but I just implemented it in a copy of CXTPTabWorkspace for myself. Mind you my version of Tabworkspace is changed a lot because I need a lot of non-standard functionality. I only included the items needed to make the tabs visible. Here is the long version:</P><P>Add a member function to CXTPTabWorkspace:</P><P><table width="99%"><tr><td><pre class="BBcode">void CXTPTabWorkspace::MakeTabVisible(int nTab)<BR>{</P><P>&nbsp;&nbsp;&nbsp; CRect rc;<BR>&nbsp;&nbsp;&nbsp; CRect rcTab = m_arrTab&#091;nTab&#093;.rcItem;</P><P>&nbsp;&nbsp;&nbsp;&nbsp;GetClientRect(&amp;rc);<BR>&nbsp;&nbsp; // Uncomment if you apply the button area exclusion region from the&nbsp;hit test<BR>&nbsp;&nbsp; // I made in another post in Xtreme Toolkit (Professional and Standard Editions)<BR>&nbsp;&nbsp; // without this the last visible tab will be clipped by the button (left/right/close) area<BR>&nbsp;&nbsp; // rc.right -= m_nButtonWidth;<BR><BR>&nbsp;&nbsp;&nbsp; if (!rc.PtInRect(CPoint(rcTab.left, rcTab.top))<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; || !rc.PtInRect(CPoint(rcTab.right, rcTab.top)))<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (rcTab.left &lt; rc.left)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; m_nOffset += rc.left - rcTab.left+6;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; m_nOffset -= rcTab.right - rc.right;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</P><P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (m_nOffset &gt; 6) m_nOffset = 6;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InvalidateRect(NULL);<BR>&nbsp;&nbsp;&nbsp; }<BR>}</pre></td></tr></table></P><P>In void CXTPTabWorkspace::OnLButtonDown(UINT nFlags, CPoint point) right after sending WM_CLOSE to the MDI Child add the code after comment // insert the code below:</P><P><table width="99%"><tr><td><pre class="BBcode"><BR>&nbsp;&nbsp;&nbsp;&nbsp; pActiveChildWnd-&gt;SendMessage(WM_CLOSE);</P><P>&nbsp;&nbsp;&nbsp;&nbsp; // insert the code below<BR>&nbsp;&nbsp;&nbsp;&nbsp; UpdateContents(FALSE);<BR>&nbsp;&nbsp;&nbsp;&nbsp; pActiveChildWnd= MDIGetActive();<BR>&nbsp;&nbsp;&nbsp;&nbsp; int nFoundItem=FindTabItem(pActiveChildWnd-&gt;GetSafeHwnd());<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp; if (nFoundItem &gt;= 0)<BR>&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MakeTabVisible(nFoundItem);<BR>&nbsp;&nbsp;&nbsp;&nbsp; }<BR></pre></td></tr></table><BR></P><P>Also insert the call to MakeTabVisible in the following, I am including surrounding lines to make it ieasier to see the context. Just the call to MakeTabVisible needs to be inserted</P><P><table width="99%"><tr><td><pre class="BBcode"></P><P>void CXTPTabWorkspace::OnLButtonUp(UINT nFlags, CPoint point)<BR>{<BR>&nbsp;&nbsp;&nbsp; if (m_nItemTracking != -1)<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MakeTabVisible(m_nItemTracking);</P><P></pre></td></tr></table></P><P>Partially visible&nbsp;tab is scrolled into view when you release the left mouse button after a click. Also partially visible (or invisible) tabs will scroll into view after close button is pressed.</P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Thu, 05 Feb 2004 20:30:28 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=286&amp;PID=970&amp;title=mdi-tabs-ensure-visible#970</guid>
  </item> 
  <item>
   <title><![CDATA[MDI Tabs - Ensure Visible :  Please wait 8.62 release. It...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=286&amp;PID=801&amp;title=mdi-tabs-ensure-visible#801</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 286<br /><strong>Posted:</strong> 16 January 2004 at 11:53am<br /><br /><P>&nbsp;</P><P>Please wait 8.62 release. It will be a lot of enhancements of TabWorkspace.</P>]]>
   </description>
   <pubDate>Fri, 16 Jan 2004 11:53:18 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=286&amp;PID=801&amp;title=mdi-tabs-ensure-visible#801</guid>
  </item> 
  <item>
   <title><![CDATA[MDI Tabs - Ensure Visible : Hear hear! More information on...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=286&amp;PID=687&amp;title=mdi-tabs-ensure-visible#687</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=206">tomhermolle</a><br /><strong>Subject:</strong> 286<br /><strong>Posted:</strong> 18 December 2003 at 11:54am<br /><br />Hear hear! More information on the TabWorkspace object would be much appreciated, as would a way of being able to either switch off, or dynamically set, the colour&nbsp;of the tabs.]]>
   </description>
   <pubDate>Thu, 18 Dec 2003 11:54:12 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=286&amp;PID=687&amp;title=mdi-tabs-ensure-visible#687</guid>
  </item> 
  <item>
   <title><![CDATA[MDI Tabs - Ensure Visible : When using the MDI Tabs with the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=286&amp;PID=652&amp;title=mdi-tabs-ensure-visible#652</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=260">Boyd</a><br /><strong>Subject:</strong> 286<br /><strong>Posted:</strong> 09 December 2003 at 9:09am<br /><br /><P>When using the MDI Tabs with the CommandBars, is there a way to ensure that a particular tab is visible?</P><P>For example, imagine you have 30 windows open and only 5 can be displayed.&nbsp; If the user switches to that window using the Window List in the menu, I would like to ensure that the MDI Tab for that window is visible in the tab strip.</P><P>Also, there is a cosmetic bug when you close child windows.&nbsp; If you have a lot of windows opened, you can scroll the MDI Tabs to the right to see more tabs.&nbsp; If you scroll all the way to the right and then start closing child windows, the scrolled position of the MDI Tabstrip doesn't change and eventually there are no viewable MDI tabs until you scroll back to the left.&nbsp;&nbsp;As child windows are closed, the&nbsp;scrolling tabstrip&nbsp;should adjust to be no further&nbsp;than the&nbsp;right-most visible MDI Tab.</P><P>Finally, the 'ShowTabWorkspace' method returns a reference to a 'TabWorkspace' object.&nbsp; This object has only one memeber, 'Flags'.&nbsp; The ActiveX documentation does not document what the available flags are.&nbsp; Could you please share this information?</P><P>Thank you for your feedback.</P>]]>
   </description>
   <pubDate>Tue, 09 Dec 2003 09:09:57 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=286&amp;PID=652&amp;title=mdi-tabs-ensure-visible#652</guid>
  </item> 
 </channel>
</rss>