<?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 : A little problem with CXTFlatTabCtrl</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : A little problem with CXTFlatTabCtrl]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 16 Apr 2026 08:36:01 +0000</pubDate>
  <lastBuildDate>Tue, 13 Jan 2004 10:07: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=214</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[A little problem with CXTFlatTabCtrl : Dear Sir, I&amp;#039;m just a begineer...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=214&amp;PID=783&amp;title=a-little-problem-with-cxtflattabctrl#783</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=308">xtreme</a><br /><strong>Subject:</strong> 214<br /><strong>Posted:</strong> 13 January 2004 at 10:07am<br /><br /><P>Dear Sir,</P><P>I'm just a begineer of this tool kit &amp; looking for some sample on How to use <SPAN class=highlight>CXTFlatTabCtrl on MDI application in vc++ , Could you please suggest me some example on the above subject or send some source code sample.</SPAN></P><P><SPAN class=highlight>Thanks &amp; Regards</SPAN></P><P><SPAN class=highlight>Xtreme</SPAN></P><P><SPAN class=highlight></SPAN>&nbsp;</P><P><SPAN class=highlight></SPAN>&nbsp;</P>]]>
   </description>
   <pubDate>Tue, 13 Jan 2004 10:07:37 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=214&amp;PID=783&amp;title=a-little-problem-with-cxtflattabctrl#783</guid>
  </item> 
  <item>
   <title><![CDATA[A little problem with CXTFlatTabCtrl : Hello, I havea little problem...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=214&amp;PID=493&amp;title=a-little-problem-with-cxtflattabctrl#493</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=201">Karnize</a><br /><strong>Subject:</strong> 214<br /><strong>Posted:</strong> 05 November 2003 at 3:37am<br /><br /><P>Hello,</P><P>I have&nbsp;a little problem with CXTFlatTabCtrl. After I create a tab control and add some pages to it I need non zero page to be currently selected. But if I do so, this non zero page displayed as the first page (i.e. in the left corner of the control) and all pages before this one will be behind the left side. It not depends on the actual size of the tab control.</P><P>In my case I have wide enough tab control and only two pages in it, so I decide to hide scroll arrows. So if now I select as current the second page in tab control after it creating, I have not access to the first tab because it located behind the control border.</P><P>Also sometimes all tabs located behind the border.</P><P>I look to the code and found the place where the problem located. In SetCurSel function you have the next code:</P><P><table width="99%"><tr><td><pre class="BBcode"></P><P>if (rcItem.left &lt;= 0)<BR>&nbsp;&nbsp;&nbsp;m_nOffset += rcItem.left;<BR>else<BR>{<BR>&nbsp;&nbsp;&nbsp;// test if the tab is off on the right<BR>&nbsp;&nbsp;&nbsp;rcItem.right -= iTotalArrowWidth;<BR>&nbsp;&nbsp;&nbsp;int iTabAreaWidth = GetTotalTabAreaWidth();<BR>&nbsp;&nbsp;&nbsp;if (rcItem.right &gt; iTabAreaWidth)<BR>&nbsp;&nbsp;&nbsp;&nbsp;m_nOffset += (rcItem.right - iTabAreaWidth);<BR>}</P><P></pre></td></tr></table></P><P>so if I select the second page the 'else' branch will be executed and GetTotalTabAreaWidth() returns the negative value, because the m_xGripperPos member is negative (because 'const int sbExtreme = (m_nClientWidth - 4 * m_cx - m_cy);' in SetGripperPosition function give the negative value while m_nClientWidth is zero). So m_nOffset became very big.</P><P>It is not so easy for me to understand how you draw tabs so I temporary solve the problem like here:</P><P><table width="99%"><tr><td><pre class="BBcode"></P><P>if (rcItem.left &lt;= 0)<BR>&nbsp;&nbsp;&nbsp;m_nOffset += rcItem.left;<BR>else<BR>{<BR>&nbsp;&nbsp;&nbsp;// test if the tab is off on the right<BR>&nbsp;&nbsp;&nbsp;rcItem.right -= iTotalArrowWidth;<BR>&nbsp;&nbsp;&nbsp;int iTabAreaWidth = GetTotalTabAreaWidth();<BR>&nbsp;&nbsp;&nbsp;if (rcItem.right &gt; iTabAreaWidth&nbsp;&nbsp;<strong>&amp;&amp; iTabAreaWidth &gt;= 0</strong>)<BR>&nbsp;&nbsp;&nbsp;&nbsp;m_nOffset += (rcItem.right - iTabAreaWidth);<BR>}</P><P></pre></td></tr></table></P><P>but I didn`t sure what it is a correct solution.</P>]]>
   </description>
   <pubDate>Wed, 05 Nov 2003 03:37:00 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=214&amp;PID=493&amp;title=a-little-problem-with-cxtflattabctrl#493</guid>
  </item> 
 </channel>
</rss>