<?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 : Transparency and Tab Controls</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Transparency and Tab Controls]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 04 Apr 2026 06:54:29 +0000</pubDate>
  <lastBuildDate>Thu, 29 Mar 2007 08:52:44 +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=6013</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[Transparency and Tab Controls : I think we figured out how to...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6013&amp;PID=21557&amp;title=transparency-and-tab-controls#21557</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1586">jansim</a><br /><strong>Subject:</strong> 6013<br /><strong>Posted:</strong> 29 March 2007 at 8:52am<br /><br /><DIV>I think we figured out how to do it ! </DIV><DIV>&nbsp;</DIV><DIV>When creating the tab child dialog, we must call the following:</DIV><DIV>&nbsp;</DIV><DIV>XTPSkinManager()-&gt;EnableThemeDialogTexture(&nbsp;childDlg.GetSafeHwnd(), ETDT_ENABLE_TAB&nbsp;);</DIV><DIV>&nbsp;</DIV><DIV>Then for every group box in the dialog, we must use a CXTResizeGroupBox.</DIV><DIV>&nbsp;</DIV><DIV>It works fine this way.</DIV><DIV>&nbsp;</DIV><DIV><img src="http://forum.codejock.com/smileys/smiley32.gif" border="0">Is is really simple to use, thank you for supporting this nice feature<img src="http://forum.codejock.com/smileys/smiley32.gif" border="0">. We just had a hard time finding how to do it.</DIV><DIV>It would be a good idea to add a sample with a dialog as a tab control page that is not a CPropertyPage.</DIV><DIV>&nbsp;</DIV><DIV>Best regards</DIV><DIV>Jansim</DIV>]]>
   </description>
   <pubDate>Thu, 29 Mar 2007 08:52:44 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6013&amp;PID=21557&amp;title=transparency-and-tab-controls#21557</guid>
  </item> 
  <item>
   <title><![CDATA[Transparency and Tab Controls : Hi, Can you upload some screenshots...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6013&amp;PID=21539&amp;title=transparency-and-tab-controls#21539</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 6013<br /><strong>Posted:</strong> 29 March 2007 at 1:22am<br /><br /><DIV>Hi,</DIV><DIV>Can you upload some screenshots to show what you mean.</DIV>]]>
   </description>
   <pubDate>Thu, 29 Mar 2007 01:22:01 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6013&amp;PID=21539&amp;title=transparency-and-tab-controls#21539</guid>
  </item> 
  <item>
   <title><![CDATA[Transparency and Tab Controls : Hi, we have the same problem here....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6013&amp;PID=21532&amp;title=transparency-and-tab-controls#21532</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1586">jansim</a><br /><strong>Subject:</strong> 6013<br /><strong>Posted:</strong> 28 March 2007 at 2:42pm<br /><br />Hi, we have the same problem here. We worked hard to find a solution that worked with MFC and Win32. We want to do the same thing with the resize dialogs that Code Jock offers, but now the background of the dialog doesn't match the one of the tab control. <DIV>&nbsp;</DIV><DIV>This is a regretable glitch. We cannot accept to release a software with ugly property pages.</DIV><DIV>&nbsp;</DIV><DIV>So I ask the question again :</DIV>Can anybody suggest a solution?<DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 28 Mar 2007 14:42:02 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6013&amp;PID=21532&amp;title=transparency-and-tab-controls#21532</guid>
  </item> 
  <item>
   <title><![CDATA[Transparency and Tab Controls : Aaahhh!!!HELP!!! I pulled my hair...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6013&amp;PID=18928&amp;title=transparency-and-tab-controls#18928</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2321">JohnCrenshaw</a><br /><strong>Subject:</strong> 6013<br /><strong>Posted:</strong> 05 January 2007 at 4:43pm<br /><br />Aaahhh!!!<img src="https://forum.codejock.com/smileys/smiley26.gif" border="0">&nbsp;HELP!!! I pulled my hair out for a few days to be able to use the tab controls (CXTTabCtrl)&nbsp;nicely in 10.3.1. Now I have downloaded and installed 10.4 and my old fix doesn't work!!!<DIV></DIV><DIV></DIV><DIV>&nbsp;</DIV><DIV>Some background on my solution. I needed to encapsulate each page of the control in it's own class (CXTResizePropertyPage derived currently.) Using the following code I added these pages:</DIV><DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV><FONT size=1><P></FONT><FONT color=#010001 size=1>m_page1</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>Create</FONT><FONT size=1>(&amp;</FONT><FONT color=#010001 size=1>m_cWhenTabs</FONT><FONT size=1>);</P><P></FONT><FONT color=#010001 size=1>m_page2</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>Create</FONT><FONT size=1>(&amp;</FONT><FONT color=#010001 size=1>m_cWhenTabs</FONT><FONT size=1>);</P><P></FONT><FONT color=#010001 size=1>m_page3</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>Create</FONT><FONT size=1>(&amp;</FONT><FONT color=#010001 size=1>m_cWhenTabs</FONT><FONT size=1>);</P><P></FONT><FONT color=#010001 size=1>m_page4</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>Create</FONT><FONT size=1>(&amp;</FONT><FONT color=#010001 size=1>m_cWhenTabs</FONT><FONT size=1>);</P><P></FONT><FONT color=#010001 size=1>m_cWhenTabs</FONT><FONT size=1>.</FONT><FONT color=#010001 size=1>AddControl</FONT><FONT size=1>(</FONT><FONT color=#010001 size=1>_T</FONT><FONT size=1>(</FONT><FONT color=#a31515 size=1>"1"</FONT><FONT size=1>), </FONT><FONT color=#010001 size=1>m_page1</FONT><FONT size=1>);</P><P></FONT><FONT color=#010001 size=1>m_cWhenTabs</FONT><FONT size=1>.</FONT><FONT color=#010001 size=1>AddControl</FONT><FONT size=1>(</FONT><FONT color=#010001 size=1>_T</FONT><FONT size=1>(</FONT><FONT color=#a31515 size=1>"2"</FONT><FONT size=1>), </FONT><FONT color=#010001 size=1>m_page2</FONT><FONT size=1>);</P><P></FONT><FONT color=#010001 size=1>m_cWhenTabs</FONT><FONT size=1>.</FONT><FONT color=#010001 size=1>AddControl</FONT><FONT size=1>(</FONT><FONT color=#010001 size=1>_T</FONT><FONT size=1>(</FONT><FONT color=#a31515 size=1>"3"</FONT><FONT size=1>), </FONT><FONT color=#010001 size=1>m_page3</FONT><FONT size=1>);</P><P></FONT><FONT color=#010001 size=1>m_cWhenTabs</FONT><FONT size=1>.</FONT><FONT color=#010001 size=1>AddControl</FONT><FONT size=1>(</FONT><FONT color=#010001 size=1>_T</FONT><FONT size=1>(</FONT><FONT color=#a31515 size=1>"4"</FONT><FONT size=1>), </FONT><FONT color=#010001 size=1>m_page4</FONT><FONT size=1>);</P><P></FONT><FONT color=#010001 size=1>m_cWhenTabs</FONT><FONT size=1>.</FONT><FONT color=#010001 size=1>SendInitialUpdate</FONT><FONT size=1>(</FONT><FONT color=#010001 size=1>TRUE</FONT><FONT size=1>);</P><P></FONT><FONT color=#010001 size=1>m_cWhenTabs</FONT><FONT size=1>.</FONT><FONT color=#010001 size=1>SetAutoCondense</FONT><FONT size=1>(</FONT><FONT color=#0000ff size=1>true</FONT><FONT size=1>);</P></FONT></pre></td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>The trouble with this is that the tab control, as encapsulated by CXTTabCtrl, has a nice pretty gradient background, while the property pages have a nice ugly solid background. Place the one on top of the other and it is REALLY ugly. I needed to fix this so I divined the following solution:</DIV><DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV><FONT color=#010001 size=1><P>BOOL</FONT><FONT size=1> </FONT><FONT color=#010001 size=1>CTransparentForm</FONT><FONT size=1>::</FONT><FONT color=#010001 size=1>OnEraseBkgnd</FONT><FONT size=1>(</FONT><FONT color=#010001 size=1>CDC</FONT><FONT size=1>* </FONT><FONT color=#010001 size=1>pDC</FONT><FONT size=1>)</P><P>{</P></FONT><FONT size=1><P></FONT><FONT color=#0000ff size=1>if</FONT><FONT size=1> (((</FONT><FONT color=#010001 size=1>CXTTabCtrl</FONT><FONT size=1>*)</FONT><FONT color=#010001 size=1>GetParent</FONT><FONT size=1>())-&gt;</FONT><FONT color=#010001 size=1>IsWindowVisible</FONT><FONT size=1>())</P><P>{</P><P></FONT><FONT color=#010001 size=1>CXTPClientRect</FONT><FONT size=1> </FONT><FONT color=#010001 size=1>rcClient</FONT><FONT size=1>(((</FONT><FONT color=#010001 size=1>CXTTabCtrl</FONT><FONT size=1>*)</FONT><FONT color=#010001 size=1>GetParent</FONT><FONT size=1>()));</P><P>((</FONT><FONT color=#010001 size=1>CXTTabCtrl</FONT><FONT size=1>*)</FONT><FONT color=#010001 size=1>GetParent</FONT><FONT size=1>())-&gt;</FONT><FONT color=#010001 size=1>ClientToScreen</FONT><FONT size=1>(</FONT><FONT color=#010001 size=1>rcClient</FONT><FONT size=1>);</P><P></FONT><FONT color=#010001 size=1>ScreenToClient</FONT><FONT size=1>(</FONT><FONT color=#010001 size=1>rcClient</FONT><FONT size=1>);</P><P></FONT><FONT color=#010001 size=1>CXTPBufferDC</FONT><FONT size=1> </FONT><FONT color=#010001 size=1>memDC</FONT><FONT size=1>(*</FONT><FONT color=#010001 size=1>pDC</FONT><FONT size=1>, </FONT><FONT color=#010001 size=1>rcClient</FONT><FONT size=1>);</P><P></FONT><FONT color=#010001 size=1>CRect</FONT><FONT size=1> </FONT><FONT color=#010001 size=1>r</FONT><FONT size=1>;</P><P></FONT><FONT color=#010001 size=1>GetWindowRect</FONT><FONT size=1>(</FONT><FONT color=#010001 size=1>r</FONT><FONT size=1>);</P><P>((</FONT><FONT color=#010001 size=1>CXTTabCtrl</FONT><FONT size=1>*)</FONT><FONT color=#010001 size=1>GetParent</FONT><FONT size=1>())-&gt;</FONT><FONT color=#010001 size=1>ScreenToClient</FONT><FONT size=1>(</FONT><FONT color=#010001 size=1>r</FONT><FONT size=1>);</P></FONT><FONT size=1><P>((</FONT><FONT color=#010001 size=1>CXTTabCtrl</FONT><FONT size=1>*)</FONT><FONT color=#010001 size=1>GetParent</FONT><FONT size=1>())-&gt;</FONT><FONT color=#010001 size=1>GetPaintManager</FONT><FONT size=1>()-&gt;</FONT><FONT color=#010001 size=1>DrawTabCtrl</FONT><FONT size=1>(&amp;</FONT><FONT color=#010001 size=1>memDC</FONT><FONT size=1>, (</FONT><FONT color=#010001 size=1>CXTTabCtrl</FONT><FONT size=1>*)</FONT><FONT color=#010001 size=1>GetParent</FONT><FONT size=1>());</P></FONT><FONT size=1><P></FONT><FONT color=#010001 size=1>CRect</FONT><FONT size=1> </FONT><FONT color=#010001 size=1>rAll</FONT><FONT size=1> = </FONT><FONT color=#010001 size=1>rcClient</FONT><FONT size=1>;</P><P></FONT><FONT color=#010001 size=1>rAll</FONT><FONT size=1>.</FONT><FONT color=#010001 size=1>MoveToXY</FONT><FONT size=1>(0,0);</P><P></FONT><FONT color=#008000 size=1>// for some unknown reason, the ScrollDC function is leaving some stuff</P></FONT><FONT size=1><P></FONT><FONT color=#008000 size=1>// at the bottom as an artifact, however, the result is barely noticeable</P></FONT><FONT size=1><P></FONT><FONT color=#008000 size=1>// (only if you are looking for it) as long as we do the vertical and</P></FONT><FONT size=1><P></FONT><FONT color=#008000 size=1>// horizontal scrolls separately. If we do them together we get a nice</P></FONT><FONT size=1><P></FONT><FONT color=#008000 size=1>// vertical bar on the tab in the bottom left corner.</P></FONT><FONT size=1><P></FONT><FONT color=#010001 size=1>memDC</FONT><FONT size=1>.</FONT><FONT color=#010001 size=1>ScrollDC</FONT><FONT size=1>(0, -</FONT><FONT color=#010001 size=1>r</FONT><FONT size=1>.</FONT><FONT color=#010001 size=1>top</FONT><FONT size=1>, </FONT><FONT color=#010001 size=1>NULL</FONT><FONT size=1>, </FONT><FONT color=#010001 size=1>NULL</FONT><FONT size=1>, </FONT><FONT color=#010001 size=1>NULL</FONT><FONT size=1>, </FONT><FONT color=#010001 size=1>NULL</FONT><FONT size=1>);</P><P></FONT><FONT color=#010001 size=1>memDC</FONT><FONT size=1>.</FONT><FONT color=#010001 size=1>ScrollDC</FONT><FONT size=1>(-</FONT><FONT color=#010001 size=1>r</FONT><FONT size=1>.</FONT><FONT color=#010001 size=1>left</FONT><FONT size=1>, 0, </FONT><FONT color=#010001 size=1>NULL</FONT><FONT size=1>, </FONT><FONT color=#010001 size=1>NULL</FONT><FONT size=1>, </FONT><FONT color=#010001 size=1>NULL</FONT><FONT size=1>, </FONT><FONT color=#010001 size=1>NULL</FONT><FONT size=1>);</P><P>}<FONT size=1></P><P></FONT><FONT color=#0000ff size=1>return</FONT><FONT size=1> </FONT><FONT color=#0000ff size=1>true</FONT><FONT size=1>;</P><P></FONT></FONT><FONT size=1>}</P></FONT></pre></td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>Basically, the code assumes that we are on top of a CXTTabCtrl, which is the parent. We grab the parent, ask it to paint itself on our device context (as our method of erasing the background) position everything properly, and return true (to indicate that the background was erased.)</DIV><DIV>&nbsp;</DIV><DIV>In version 10.3.1 this solution worked, in the current version the net effect seems to be nothing.</DIV><DIV>&nbsp;</DIV><DIV>I would of course be satisfied with just being able to see the tab control background again, however, ultimately, this solution is ugly. Is there any chance of getting a more solid solution in the future, perhaps a CXTTabControlPage that removes the burden from code on the user side?</DIV><DIV>&nbsp;</DIV><DIV>I have a hard time imagining that I am the first person to have a problem with this. Using tab controls is an immense amount of work because of the gradient background. I had to override and paint Checkboxes, radio buttons, group boxes, static text, and there are some things I didn't get to because I didn't need to&nbsp;use them. Perhaps it wouldn't be a bad idea to have a set of classes to draw these "transparent" items in a truly transparent fashion. Without this, the tab controls are hard enough to use, it isn't even worth it anymore for the average program, however, I digress.</DIV><DIV>&nbsp;</DIV><DIV>I have everything in place to be able to use the tab controls, but I can't because the stupid property page can't pretend to be transparent anymore. Can anybody suggest a solution?</DIV><DIV>&nbsp;</DIV><DIV>John.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Fri, 05 Jan 2007 16:43:34 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6013&amp;PID=18928&amp;title=transparency-and-tab-controls#18928</guid>
  </item> 
 </channel>
</rss>