<?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 : CXTTabCtrl bugs</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : CXTTabCtrl bugs]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 16 May 2026 00:36:01 +0000</pubDate>
  <lastBuildDate>Tue, 21 Oct 2003 02:33: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=183</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[CXTTabCtrl bugs : Hello, I use the CXTTabCtrl (from...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=183&amp;PID=372&amp;title=cxttabctrl-bugs#372</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=201">Karnize</a><br /><strong>Subject:</strong> 183<br /><strong>Posted:</strong> 21 October 2003 at 2:33am<br /><br /><P>Hello,</P><P>I use the CXTTabCtrl (from the last 8.51 release, but the same problems are in all XtremeToolkit versions) with multiline and XP styles and found some bugs.</P><P>Tabs located at the top of the window, I do not test this control with vertical or bottom tabs.</P><P>First of all, then you enable multiline and XP styles and tabs wraps to multiline, there is tabs drawing bug. Inactive tabs background drawing correctly only at first line and active tab elements also drawed at first line (but active tab always located at the most bottom line).</P><P>In OnDrawTop function I found what you calculate</P><P><strong>int iBottom = rcClient.top + rcItem.Height();</strong></P><P>and after that you use iBottom in all active tab drawing, but reClient.top == 0 in case of top docked tabs and rcItem.Height() returns height of ONE tab, but active tab located not at first row.</P><P>For the background you also use</P><P><strong>m_pTabCtrl-&gt;GetItemRect(-1, &amp;rcHeight);<BR>&nbsp;rcClient.bottom = rcHeight.bottom;<BR>&nbsp;pDC-&gt;FillSolidRect(rcClient, xtAfxData.clrXPTabInactiveBack);</strong></P><P>but GetItemRect returns rect also of one item, so you fill the background only at first row.</P><P>&nbsp;</P><P>The next bug is in calculating space which tabs take up while resizing window. Then you resize you window so all tabs are located at single line and after that resize the window back, so tabs are&nbsp;wrap several lines, you will see what active tab content still drawed in old size and cover all tabs in bottom lines.</P><P>I found this in your code:</P><P><strong>void CXTTabCtrl::OnWindowPosChanged(WINDOWPOS FAR* lpwndpos) <BR>{<BR>&nbsp;OnWindowPosChangedImpl_Pre(lpwndpos);<BR>&nbsp;CTabCtrl::OnWindowPosChanged(lpwndpos);<BR>&nbsp;OnWindowPosChangedImpl_Post(lpwndpos);<BR>}</strong></P><P>In OnWindowPosChangedImpl_Pre you recalculate size of all views located at tabs, but at this step tab control still think what&nbsp;all tabs located at single line and only in CTabCtrl::OnWindowPosChanged it knows what tabs should be wraped to multiline. So the size of all views is calculated wrong. I solve this problem in my derived class in this way:</P><P><strong>void CXTTabCtrl::OnWindowPosChanged(WINDOWPOS FAR* lpwndpos) <BR>{</strong></P><P><strong>&nbsp;CTabCtrl::OnWindowPosChanged(lpwndpos);<BR>&nbsp;OnWindowPosChangedImpl_Pre(lpwndpos);<BR>&nbsp;OnWindowPosChangedImpl_Post(lpwndpos);<BR>}</strong></P><P>All&nbsp; these bugs you can repeat if you run your TabCtrl example. But you should disable "Draw window content while resizing" in Windows to see the second bug.</P><span style="font-size:10px"><br /><br />Edited by Karnize</span>]]>
   </description>
   <pubDate>Tue, 21 Oct 2003 02:33:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=183&amp;PID=372&amp;title=cxttabctrl-bugs#372</guid>
  </item> 
 </channel>
</rss>