<?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 : EraseBkgnd of office 2007 style</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Skin Framework : EraseBkgnd of office 2007 style]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 25 May 2026 13:20:47 +0000</pubDate>
  <lastBuildDate>Tue, 30 Jan 2007 02:39:22 +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=6253</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[EraseBkgnd of office 2007 style : Hi,  Attach project to debug...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6253&amp;PID=19864&amp;title=erasebkgnd-of-office-2007-style#19864</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 6253<br /><strong>Posted:</strong> 30 January 2007 at 2:39am<br /><br /><P>Hi,</P><DIV>&nbsp;</DIV><DIV>Attach project to debug it.</DIV><DIV>&nbsp;</DIV><DIV>line</DIV><DIV>HDC hDC = GetDC()-&gt;m_hDC;<BR>looks very wrong.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>these also:</DIV><DIV>&nbsp; oldbrush=(CBrush *)pDC-&gt;SelectObject(&amp;pbitmap);</DIV><DIV>pbitmap.DeleteObject();</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 30 Jan 2007 02:39:22 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6253&amp;PID=19864&amp;title=erasebkgnd-of-office-2007-style#19864</guid>
  </item> 
  <item>
   <title><![CDATA[EraseBkgnd of office 2007 style : oleg, thanks for your helping but...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6253&amp;PID=19850&amp;title=erasebkgnd-of-office-2007-style#19850</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2327">reeves</a><br /><strong>Subject:</strong> 6253<br /><strong>Posted:</strong> 29 January 2007 at 10:00pm<br /><br /><P>oleg, thanks for your helping</P><DIV>but i am not sure what i have done is right, because i still can not set the controls as transparent as your advice.</DIV><DIV>&nbsp;</DIV><DIV>HBRUSH COptionsPage::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) <BR>{<BR>&nbsp;HBRUSH hbr = CPropertyPage::OnCtlColor(pDC, pWnd, nCtlColor);<BR>&nbsp;HDC hDC = GetDC()-&gt;m_hDC;<BR>&nbsp;HWND hWnd = pWnd-&gt;GetSafeHwnd();</DIV><DIV>&nbsp;switch(nCtlColor)<BR>&nbsp;{<BR>&nbsp;case CTLCOLOR_BTN:<BR>&nbsp;case CTLCOLOR_STATIC:<BR>&nbsp;case CTLCOLOR_EDIT:<BR>&nbsp;case CTLCOLOR_MSGBOX:</DIV><DIV>&nbsp;&nbsp; CBrush *oldbrush;<BR>&nbsp;&nbsp; pDC-&gt;SetBrushOrg(0,0);<BR>&nbsp;&nbsp; oldbrush=(CBrush *)pDC-&gt;SelectObject(&amp;pbitmap);<BR>&nbsp;&nbsp; hbr = (HBRUSH) oldbrush;<BR>&nbsp; </DIV><DIV><BR>&nbsp;if (hWnd != m_hWnd)<BR>&nbsp; {<BR>&nbsp;&nbsp; CXTPWindowRect rcPaint(hWnd);<BR>&nbsp;&nbsp; CXTPWindowRect rcBrush(m_hWnd);<BR>&nbsp;&nbsp; ::SetBrushOrgEx(hDC,&nbsp; rcPaint.left-rcBrush.left,&nbsp; rcPaint.top-rcBrush.top, NULL);<BR>&nbsp;&nbsp; ::SetBkMode(hDC, TRANSPARENT);<BR>&nbsp;&nbsp; ::SetTextColor(hDC, GetSysColor(COLOR_BTNTEXT));//&nbsp;&nbsp; GetColor(COLOR_BTNTEXT));<BR>&nbsp; }</DIV><DIV>&nbsp;&nbsp;pbitmap.DeleteObject();</DIV><DIV>&nbsp; return hbr;</DIV><DIV>&nbsp;&nbsp;break;<BR>&nbsp;default:<BR>&nbsp;&nbsp;hbr = CPropertyPage::OnCtlColor(pDC, pWnd, nCtlColor);<BR>&nbsp;&nbsp;break;&nbsp;<BR>&nbsp;}<BR>}</DIV><DIV>&nbsp;</DIV><DIV><img src="https://forum.codejock.com/uploads/20070129_215424_2.JPG" border="0"></DIV><DIV>&nbsp;</DIV><DIV>so, the scroll bar's backgroud is office 2007 skin.</DIV><DIV>some part of static is white, some part is office 2007 skin.</DIV><DIV>check box's bk is office 2007 skin, even the edit box has black frame.</DIV><DIV>&nbsp;</DIV><DIV>so, how to do next? </DIV><DIV>&nbsp;</DIV><DIV>thanks a lot.</DIV>]]>
   </description>
   <pubDate>Mon, 29 Jan 2007 22:00:49 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6253&amp;PID=19850&amp;title=erasebkgnd-of-office-2007-style#19850</guid>
  </item> 
  <item>
   <title><![CDATA[EraseBkgnd of office 2007 style : Hi,  I sure it will not work...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6253&amp;PID=19822&amp;title=erasebkgnd-of-office-2007-style#19822</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 6253<br /><strong>Posted:</strong> 29 January 2007 at 1:13am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>I sure it will not work even without skinframework.</DIV><DIV>&nbsp;</DIV><DIV>try following. Load this bitmap and create brush from bitmap (m_brush)</DIV><DIV>&nbsp;</DIV><DIV>from OnCtlColor:</DIV><DIV>&nbsp;</DIV><DIV>if (hWnd != m_hWnd)<BR>&nbsp;{<BR>&nbsp;&nbsp;CXTPWindowRect rcPaint(hWnd);<BR>&nbsp;&nbsp;CXTPWindowRect rcBrush(m_hWnd);<BR>&nbsp;&nbsp;::SetBrushOrgEx(hDC, rcBrush.left - rcPaint.left, rcBrush.top - rcPaint.top, NULL);</DIV><DIV>&nbsp;&nbsp;::SetBkMode(hDC, TRANSPARENT);<BR>&nbsp;&nbsp;::SetTextColor(hDC, GetColor(COLOR_BTNTEXT));<BR>&nbsp;}</DIV><DIV>&nbsp;return m_brush;<BR></DIV>]]>
   </description>
   <pubDate>Mon, 29 Jan 2007 01:13:50 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6253&amp;PID=19822&amp;title=erasebkgnd-of-office-2007-style#19822</guid>
  </item> 
  <item>
   <title><![CDATA[EraseBkgnd of office 2007 style : sorry, that happens on CPropertyPage...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6253&amp;PID=19818&amp;title=erasebkgnd-of-office-2007-style#19818</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2327">reeves</a><br /><strong>Subject:</strong> 6253<br /><strong>Posted:</strong> 28 January 2007 at 10:02pm<br /><br />sorry, that happens on CPropertyPage not CDialog<DIV>&nbsp;</DIV><DIV>&nbsp;HBRUSH hbr = CPropertyPage::OnCtlColor(pDC, pWnd, nCtlColor);<BR>&nbsp; if (nCtlColor == CTLCOLOR_STATIC &amp;&amp; pWnd-&gt;IsWindowEnabled())<BR>&nbsp; {<BR>&nbsp;&nbsp; pDC-&gt;SetBkMode(TRANSPARENT);<BR>&nbsp;&nbsp; return (HBRUSH)GetStockObject(NULL_BRUSH); <BR>&nbsp;&nbsp; }<BR>&nbsp; return hbr;<BR></DIV>]]>
   </description>
   <pubDate>Sun, 28 Jan 2007 22:02:01 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6253&amp;PID=19818&amp;title=erasebkgnd-of-office-2007-style#19818</guid>
  </item> 
  <item>
   <title><![CDATA[EraseBkgnd of office 2007 style : hi,  i enabled office 2007 blue...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6253&amp;PID=19817&amp;title=erasebkgnd-of-office-2007-style#19817</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2327">reeves</a><br /><strong>Subject:</strong> 6253<br /><strong>Posted:</strong> 28 January 2007 at 9:33pm<br /><br />hi,<DIV>&nbsp;</DIV><DIV>i enabled office 2007 blue style of skin framework on my app.</DIV><DIV>but i also wanna set background of dialog on it.</DIV><DIV>but almost of the standard controls can not be set as transparent.</DIV><DIV>only the static control can use <strong>OnCtlColor</strong> method to set transparency.</DIV><DIV>&nbsp;</DIV><DIV>HBRUSH CTestDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) <BR>{<BR>&nbsp;HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);<BR>&nbsp;if (nCtlColor == CTLCOLOR_STATIC &amp;&amp; pWnd-&gt;IsWindowEnabled())<BR>&nbsp;{<BR>&nbsp;&nbsp;pDC-&gt;SetBkMode(TRANSPARENT);<BR>&nbsp;&nbsp;return (HBRUSH)GetStockObject(NULL_BRUSH);&nbsp;<BR>&nbsp;&nbsp;}<BR>&nbsp;return hbr;<BR>}<BR></DIV><DIV>So, how can I set other controls to transparent, such as check box, radio, scrool bar&nbsp;and edit box.</DIV><DIV>&nbsp;</DIV><DIV>refer the following pic</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV><img src="https://forum.codejock.com/uploads/20070128_213213_1.JPG" border="0"></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>thanks in advance.</DIV>]]>
   </description>
   <pubDate>Sun, 28 Jan 2007 21:33:35 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6253&amp;PID=19817&amp;title=erasebkgnd-of-office-2007-style#19817</guid>
  </item> 
 </channel>
</rss>