<?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 : Office 2007 theme + animation + draw problem</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Skin Framework : Office 2007 theme + animation + draw problem]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 05 Apr 2026 18:50:46 +0000</pubDate>
  <lastBuildDate>Tue, 10 Jul 2007 13:40:38 +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=7568</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[Office 2007 theme + animation + draw problem : Ok, I&amp;#039;ve found a solution...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7568&amp;PID=24361&amp;title=office-2007-theme-animation-draw-problem#24361</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=203">Ark42</a><br /><strong>Subject:</strong> 7568<br /><strong>Posted:</strong> 10 July 2007 at 1:40pm<br /><br />Ok, I've found a solution so I can keep using my custom control. Instead of hooking WM_CTLCOLORSTATIC from CXTPControlCustom-derived class with XTPHookManager, I moved the same code to ON_WM_CTLCOLOR_REFLECT in the CSliderCtrl-derived class and it works for Office 2007 while still working the same for Office 2003 theme.<br><br><br>]]>
   </description>
   <pubDate>Tue, 10 Jul 2007 13:40:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7568&amp;PID=24361&amp;title=office-2007-theme-animation-draw-problem#24361</guid>
  </item> 
  <item>
   <title><![CDATA[Office 2007 theme + animation + draw problem : Unfortunately, no, your CXTPControlSlider()...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7568&amp;PID=24356&amp;title=office-2007-theme-animation-draw-problem#24356</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=203">Ark42</a><br /><strong>Subject:</strong> 7568<br /><strong>Posted:</strong> 10 July 2007 at 11:16am<br /><br />Unfortunately, no, your CXTPControlSlider() will not work - I needaccess to SetTickFreq() as well as removing TBS_BOTH and increasing theheight to 30px. Also, CXTPControlSlider() looks to be drawn in XP style even using Office 2007 Ribbon skin:<br><img src="uploads/20070710_111329_yours.png" height="26" width="270" border="0"><br><br>The class I've been using since 9.81 and before works fine still, and is even drawn in the correct Office 2007 style:<br><img src="uploads/20070710_111425_mine.png" height="34" width="409" border="0"><br><br>If I manually set my key color to RGB(191, 219, 255) to match that background color, it is drawn correctly too:<br><img src="uploads/20070710_111530_manualkey.png" height="34" width="409" border="0"><br><br>However, that would NOT draw correctly on other systems or themes with the hard-coded key color. I really need it to somehow obey WM_CTLCOLORSTATIC like it still does if I use Office 2003 theme.<br><br>]]>
   </description>
   <pubDate>Tue, 10 Jul 2007 11:16:49 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7568&amp;PID=24356&amp;title=office-2007-theme-animation-draw-problem#24356</guid>
  </item> 
  <item>
   <title><![CDATA[Office 2007 theme + animation + draw problem : Hi, Check Samples\CommandBars\CommandBarControls...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7568&amp;PID=24350&amp;title=office-2007-theme-animation-draw-problem#24350</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 7568<br /><strong>Posted:</strong> 10 July 2007 at 9:05am<br /><br /><P>Hi,</P><DIV>Check Samples\CommandBars\CommandBarControls sample - it has slider + Ribbon theme.</DIV>]]>
   </description>
   <pubDate>Tue, 10 Jul 2007 09:05:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7568&amp;PID=24350&amp;title=office-2007-theme-animation-draw-problem#24350</guid>
  </item> 
  <item>
   <title><![CDATA[Office 2007 theme + animation + draw problem : I&amp;#039;ve found the problem here,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7568&amp;PID=24345&amp;title=office-2007-theme-animation-draw-problem#24345</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=203">Ark42</a><br /><strong>Subject:</strong> 7568<br /><strong>Posted:</strong> 10 July 2007 at 1:43am<br /><br /><br>I've found the problem here, it was in my custom slider control for the command bars causing extra invalidates.<br><br>void CXTPSliderCtrlToolbar::OnPaint(void)<br>{<br>&nbsp;&nbsp;&nbsp; const MSG *msg = GetCurrentMessage();<br>&nbsp;&nbsp;&nbsp; if( msg-&gt;wParam ) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CDC *pDC = CDC::FromHandle((HDC)msg-&gt;wParam);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CRect rect;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; GetClientRect(&amp;rect);<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CTransMemDC memDC(pDC, rect, SLIDER_COLORKEY);<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; DefWindowProc(WM_PAINT, (WPARAM)memDC.m_hDC, 0);<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if( GetFocus() == this ) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPPaintManager *pPaintMgr = static_cast&lt;CXTPMDIFrameWnd *&gt;(AfxGetMainWnd())-&gt;GetCommandBars()-&gt;GetPaintManager();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; memDC.Draw3dRect(&amp;rect, pPaintMgr-&gt;GetXtremeColor(COLOR_BTNSHADOW), pPaintMgr-&gt;GetXtremeColor(COLOR_BTNHIGHLIGHT));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } else if( (GetStyle() &amp; WS_DISABLED) &amp;&amp; m_bkColorKey != 0 ) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for( int y = rect.top; y &lt; rect.bottom; y++ ) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for( int x = rect.left; x &lt; rect.right; x++ ) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if( (x &amp; 1) == (y &amp; 1) ) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; memDC.SetPixel(x, y, m_bkColorKey);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; } else {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CPaintDC dc(this);<br>//&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; GetParent()-&gt;RedrawWindow(NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if( pControl ) pControl-&gt;RedrawParent(FALSE);<br>&nbsp;&nbsp;&nbsp; }<br>}<br><br><br>Instead of calling RedrawWindow, I had to capture the CXTPControlCustom pointer and call it's RedrawParent().<br><br>Now there is still another problem -- Office 2007 theme does NOT call WM_CTLCOLORSTATIC when drawing the slider bars, so the background is a solid blue color and not what SLIDER_COLORKEY needs for my transparent DC to work.<br><br>How can I make my custom slider control use transparent background with Office 2007 theme? It worked great with Office 2003 theme before.<br><br>]]>
   </description>
   <pubDate>Tue, 10 Jul 2007 01:43:52 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7568&amp;PID=24345&amp;title=office-2007-theme-animation-draw-problem#24345</guid>
  </item> 
  <item>
   <title><![CDATA[Office 2007 theme + animation + draw problem : I have two buttons, a play and...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7568&amp;PID=24339&amp;title=office-2007-theme-animation-draw-problem#24339</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=203">Ark42</a><br /><strong>Subject:</strong> 7568<br /><strong>Posted:</strong> 09 July 2007 at 11:11pm<br /><br /><br>I have two buttons, a play and stop button, where only one is enabled at a time. If I use Office 2007 theme + enable animation and click the play button, the effects blink rapidly as they fade away because the play button disables itself on click and the stop button is then enabled.<br><br>]]>
   </description>
   <pubDate>Mon, 09 Jul 2007 23:11:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7568&amp;PID=24339&amp;title=office-2007-theme-animation-draw-problem#24339</guid>
  </item> 
 </channel>
</rss>