<?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 : Is this implementation correct?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Docking Pane : Is this implementation correct?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 20 Apr 2026 11:22:31 +0000</pubDate>
  <lastBuildDate>Wed, 05 Feb 2014 09:09:30 +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=22193</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[Is this implementation correct? : Hello guysI&amp;#039;m implements...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22193&amp;PID=72235&amp;title=is-this-implementation-correct#72235</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3301">Michl</a><br /><strong>Subject:</strong> 22193<br /><strong>Posted:</strong> 05 February 2014 at 9:09am<br /><br />Hello guys<br><br>I'm implements a own header style for a tabbed container.<br><br>If the control paints itself, the overrideable method is calling:<br><table width="99%"><tr><td><pre class="BBcode"><br>CRect CXTPTabPaintManagerTheme::FillTabControl(CXTPTabManager* /*pTabManager*/, CDC* /*pDC*/, CRect /*rcControl*/)<br></pre></td></tr></table><br><br>There I apply the code from various existing themes:<br><table width="99%"><tr><td><pre class="BBcode"><br>&nbsp;&nbsp;&nbsp; CRect rcHeader = GetHeaderRect(rcControl, pTabManager);<br>&nbsp;&nbsp;&nbsp; GetColorSet()-&gt;FillHeader(pDC, rcHeader, pTabManager);<br></pre></td></tr></table><br><br>I wondering why my line at bottom is never displayed. The reason is, that the result height of GetHeaderRect is 22 pixels, but bevor painting/drawing codejock selects a clip box of 21 pixels.<br><br>In my opinion the header area should be fully visible if rcHeader indicates this.<br><br><br><br>Further information of debbuging results:<br><br>I found that the clip box will be calculated from top until the beginning of the client area of the pane. The top position of client area will be calculated in:<br><br><table width="99%"><tr><td><pre class="BBcode"><br>CRect CXTPTabPaintManagerTheme::GetClientRect(CRect rcControl, CXTPTabManager* pTabManager)<br>{<br>&nbsp;&nbsp;&nbsp; if (!m_pPaintManager-&gt;m_bShowTabs)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return rcControl;<br><br>&nbsp;&nbsp;&nbsp; CRect rcClient(rcControl);<br>&nbsp;&nbsp;&nbsp; CRect rcHeader = GetHeaderRect(rcControl, pTabManager);<br><br>&nbsp;&nbsp;&nbsp; switch (pTabManager-&gt;GetPosition())<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case xtpTabPositionTop: rcClient.top = rcHeader.bottom - 1; break;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case xtpTabPositionLeft: rcClient.left = rcHeader.right - 1; break;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case xtpTabPositionBottom: rcClient.bottom = rcHeader.top + 1; break;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case xtpTabPositionRight: rcClient.right = rcHeader.left + 1; break;<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; return rcClient;<br>}<br></pre></td></tr></table><br><br>Here i'm disagree your logic. Why does the client area starts at rcHeader.bottom - 1???<br>So client and header is overlapped.<br>It should be<br><table width="99%"><tr><td><pre class="BBcode"><br>&nbsp;&nbsp;&nbsp; switch (pTabManager-&gt;GetPosition())<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case xtpTabPositionTop: rcClient.top = rcHeader.bottom + 1; break;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case xtpTabPositionLeft: rcClient.left = rcHeader.right + 1; break;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case xtpTabPositionBottom: rcClient.bottom = rcHeader.top - 1; break;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case xtpTabPositionRight: rcClient.right = rcHeader.left - 1; break;<br>&nbsp;&nbsp;&nbsp; }<br></pre></td></tr></table><br><br>I correct this overlapp by adding 2 margin pixels at top which will be added in:<br><table width="99%"><tr><td><pre class="BBcode"><br>void CXTPTabPaintManagerTheme::AdjustClientRect(CXTPTabManager* pTabManager, CRect&amp; rcClient)<br>{<br>&nbsp;&nbsp;&nbsp; DeflateRectEx(rcClient, m_pPaintManager-&gt;m_rcControlMargin, pTabManager-&gt;GetPosition());<br>&nbsp;&nbsp;&nbsp; rcClient = GetClientRect(rcClient, pTabManager);<br><br>&nbsp;&nbsp;&nbsp; DeflateRectEx(rcClient, GetClientMargin(), pTabManager-&gt;GetPosition());<br><br>&nbsp;&nbsp;&nbsp; if (m_pPaintManager-&gt;m_clientFrame == xtpTabFrameBorder)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; DeflateRectEx(rcClient, CRect(2, 2, 2, 2), pTabManager-&gt;GetPosition());<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; if (m_pPaintManager-&gt;m_clientFrame == xtpTabFrameSingleLine)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; DeflateRectEx(rcClient, CRect(0, 2, 0, 0), pTabManager-&gt;GetPosition());<br>&nbsp;&nbsp;&nbsp; }<br>}<br></pre></td></tr></table><br><br>Is this a bug or "by design"?<br><br>Thanks<br>]]>
   </description>
   <pubDate>Wed, 05 Feb 2014 09:09:30 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22193&amp;PID=72235&amp;title=is-this-implementation-correct#72235</guid>
  </item> 
 </channel>
</rss>