<?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 : Disabled Alpha Ic&#111;ns</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Disabled Alpha Ic&#111;ns]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 19 Apr 2026 09:31:53 +0000</pubDate>
  <lastBuildDate>Wed, 08 Sep 2004 17:00:06 +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=1146</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[Disabled Alpha Ic&#111;ns : It would be nice if Codejock can...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1146&amp;PID=3037&amp;title=disabled-alpha-icons#3037</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=150">Sven</a><br /><strong>Subject:</strong> 1146<br /><strong>Posted:</strong> 08 September 2004 at 5:00pm<br /><br /><P>It would be nice if Codejock can add your code to the library. <IMG src="http://forum.codejock.com/smileys/smiley1.gif" border="0"></P>]]>
   </description>
   <pubDate>Wed, 08 Sep 2004 17:00:06 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1146&amp;PID=3037&amp;title=disabled-alpha-icons#3037</guid>
  </item> 
  <item>
   <title><![CDATA[Disabled Alpha Ic&#111;ns :  Yes, I really like this using...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1146&amp;PID=3036&amp;title=disabled-alpha-icons#3036</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=203">Ark42</a><br /><strong>Subject:</strong> 1146<br /><strong>Posted:</strong> 08 September 2004 at 4:55pm<br /><br /><br>Yes, I really like this using XPCOLOR_DISABLED for the dark color andXPCOLOR_3DFACE for the lightcolor.&nbsp; Is there any way to internally use these colors and nothave such a mess of code like I sort of created trying this out?<br>The results are very nice:<br>Using this method: <img src="uploads/Ark42/2004-09-08_165248_NewCode.png" border="0">&nbsp; compared to the actual Office 2003 &nbsp;<img src="https://forum.codejock.com/uploads/Ark42/2004-09-06_193220_Office2003.png" border="0">&nbsp; <br>Its not exactly the same, but its good enough and looks very nice still.<br><br>To compare:<br><img src="uploads/Ark42/2004-09-08_165308_CompareColors.png" border="0"><br>This is the 3 XP themes and then the normal Win2000 theme and also Spruce and Lilac.<br>Each in Office 2003, XP, then 2000 styles.<br><br>]]>
   </description>
   <pubDate>Wed, 08 Sep 2004 16:55:35 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1146&amp;PID=3036&amp;title=disabled-alpha-icons#3036</guid>
  </item> 
  <item>
   <title><![CDATA[Disabled Alpha Ic&#111;ns :  After playing around with it...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1146&amp;PID=3012&amp;title=disabled-alpha-icons#3012</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=203">Ark42</a><br /><strong>Subject:</strong> 1146<br /><strong>Posted:</strong> 08 September 2004 at 1:04am<br /><br /><br>After playing around with it some more, I actually like usingXPCOLOR_DISABLED for the dark color and XPCOLOR_3DFACE for the lightcolor. It works very well under all of the color themes under XP andunder classic themes.<br><br>I still feel it is very hackishly done and would like some input on howto clean it up or if you can include such a feature in the future so Iwouldn't have to continuously update the library each time I download anew version.<br><br>Right now, I have a function that handles switching themes, and I stuck in:<br>&nbsp;&nbsp;&nbsp; CXTPImageManager::m_clrDisabledDark = pPaintMgr-&gt;GetXtremeColor(XPCOLOR_DISABLED);<br>&nbsp;&nbsp;&nbsp; CXTPImageManager::m_clrDisabledLight = pPaintMgr-&gt;GetXtremeColor(XPCOLOR_3DFACE);<br>which works very nicely..<br>In my void CMainFrame::OnSysColorChange() I also added<br>&nbsp;&nbsp;&nbsp; CXTPImageManager::m_clrDisabledDark = pPaintMgr-&gt;GetXtremeColor(XPCOLOR_DISABLED);<br>&nbsp;&nbsp;&nbsp; CXTPImageManager::m_clrDisabledLight = pPaintMgr-&gt;GetXtremeColor(XPCOLOR_3DFACE);<br>&nbsp;&nbsp;&nbsp; GetCommandBars()-&gt;GetImageManager()-&gt;RefreshAll();<br>I'm not sure why I needed the RefreshAll there, but I did.<br><br><span style="font-weight: bold;">All of this works entirely, but I don't feel its the best design.<br><br></span>]]>
   </description>
   <pubDate>Wed, 08 Sep 2004 01:04:56 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1146&amp;PID=3012&amp;title=disabled-alpha-icons#3012</guid>
  </item> 
  <item>
   <title><![CDATA[Disabled Alpha Ic&#111;ns :     I started some of this,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1146&amp;PID=3009&amp;title=disabled-alpha-icons#3009</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=203">Ark42</a><br /><strong>Subject:</strong> 1146<br /><strong>Posted:</strong> 07 September 2004 at 11:00pm<br /><br /><br>I started some of this, but I am unsure how to properly make all the changes for this in the library.<br><br>First, I added:<br><span style="color: rgb(0, 102, 0);">COLORREF CXTPImageManager::m_clrDisabledDark = RGB(128, 128, 128);</span><br style="color: rgb(0, 102, 0);"><span style="color: rgb(0, 102, 0);">COLORREF CXTPImageManager::m_clrDisabledLight = RGB(192, 192, 192);<br></span>since I couldn't get <span style="color: rgb(102, 102, 0);">GetXtremeColor()</span> to work for <span style="color: rgb(102, 102, 0);">XPCOLOR_*</span> inside of <span style="color: rgb(102, 102, 0);">CXTPImageManagerIcon</span>anyplace, and even if it did work, the proper color ranges for the XPthemes don't really exist using any of the colors I would have to pickfrom.<br>I also changed <span style="color: rgb(102, 102, 0);">CXTPImageManager::m_dDisabledBrightnessFactor<span style="color: rgb(0, 0, 0);"> to default to <span style="color: rgb(0, 102, 0);">1.0</span> instead of <span style="color: rgb(102, 0, 0);">0.5</span>;</span></span><br><br>So in <span style="color: rgb(102, 102, 0);">CXTPImageManagerIcon::CreateDisabledIcon()</span><br>I changed the first:<br><span style="color: rgb(102, 0, 0);">int nGray = (BYTE)(pow(dGray / 255.0, CXTPImageManager::m_dDisabledBrightnessFactor) * 255.0);</span><br>to:<br><span style="color: rgb(0, 102, 0);">int nGray = (BYTE)(dGray/CXTPImageManager::m_dDisabledBrightnessFactor);</span><br>because it scales much nicer that way, then below that I made some bigger changes:<br>just before the <span style="color: rgb(102, 102, 0);">for (UINT i = 0; i &lt; nSize; i += 4)</span> loop, I added:<br><span style="color: rgb(0, 102, 0);">COLORREF clrRange = RGB( GetRValue(CXTPImageManager::m_clrDisabledLight) - GetRValue(CXTPImageManager::m_clrDisabledDark),</span><br style="color: rgb(0, 102, 0);"><span style="color: rgb(0, 102, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;GetGValue(CXTPImageManager::m_clrDisable dLight) -GetGValue(CXTPImageManager::m_clrDisabledDark),</span><br style="color: rgb(0, 102, 0);"><span style="color: rgb(0, 102, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;GetBValue(CXTPImageManager::m_clrDisable dLight) -GetBValue(CXTPImageManager::m_clrDisabledDark) );</span><br>then inside the loop I changed:<br><span style="color: rgb(102, 0, 0);">double dGray = pBits&#091;i + 0&#093; * 0.299 + pBits&#091;i + 1&#093; * 0.587 + pBits&#091;i + 2&#093; * 0.114;</span><br style="color: rgb(102, 0, 0);"><span style="color: rgb(102, 0, 0);">pBits&#091;i + 0&#093; = pBits&#091;i + 1&#093; = pBits&#091;i + 2&#093; = (BYTE)(pow(dGray / 255.0, CXTPImageManager::m_dDisabledBrightnessFactor) * 255.0);</span><br>to:<br><span style="color: rgb(0, 102, 0);">double dGray = (pBits&#091;i + 0&#093; *0.299 + pBits&#091;i + 1&#093; * 0.587 + pBits&#091;i + 2&#093; * 0.114) /CXTPImageManager::m_dDisabledBrightnessFactor / 255.0;</span><br><span style="color: rgb(0, 102, 0);">pBits&#091;i + 0&#093; = GetBValue(CXTPImageManager::m_clrDisabledDark) + BYTE(dGray * GetBValue(clrRange));</span><br style="color: rgb(0, 102, 0);"><span style="color: rgb(0, 102, 0);">pBits&#091;i + 1&#093; = GetGValue(CXTPImageManager::m_clrDisabledDark) + BYTE(dGray * GetGValue(clrRange));</span><br style="color: rgb(0, 102, 0);"><span style="color: rgb(0, 102, 0);">pBits&#091;i + 2&#093; = GetRValue(CXTPImageManager::m_clrDisabledDark) + BYTE(dGray * GetRValue(clrRange));</span><br><br>I also added a <span style="color: rgb(0, 102, 0);">GetImageManager()-&gt;RefreshAll();</span> in <span style="color: rgb(102, 102, 0);">CXTPCommandBars::SetPaintManager</span> so that the disabledauto icons would be flushed if the theme is changed just like they are when the system colors change.<br><br>So in order to actually use this, I just assumed the XP default blue theme to test, and set:<br><span style="color: rgb(102, 102, 0);">CXTPImageManager::m_clrDisabledDark = RGB(97, 122, 172);</span><br style="color: rgb(102, 102, 0);"><span style="color: rgb(102, 102, 0);">CXTPImageManager::m_clrDisabledLight = RGB(233, 236, 242);</span><br>and the results are very similar to what Office 2003 actually does.<br><br>The only problem is hardcoding all these values for all the variousthemes and changing them manually by resetting those two variableswhenever the system colors or theme changes.<br><br>My new code: <img src="uploads/Ark42/2004-09-07_230034_NewCode.png" border="0"><br><br><br><span style="color: rgb(0, 0, 0); font-weight: bold;">A good enough approximation would probably be to use XPCOLOR_3DFACE for</span><span style="color: rgb(0, 0, 0); font-weight: bold;"> m_clrDisabledLight </span><span style="color: rgb(0, 0, 0); font-weight: bold;">and2/3 of each of the RGB values from that for m_clrDisabledDark, but Ican't see any good way to automate this so the user doesn't have tokeep setting them...<br><br></span><br><span style="font-size:10px"><br /><br />Edited by Ark42</span>]]>
   </description>
   <pubDate>Tue, 07 Sep 2004 23:00:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1146&amp;PID=3009&amp;title=disabled-alpha-icons#3009</guid>
  </item> 
  <item>
   <title><![CDATA[Disabled Alpha Ic&#111;ns :  Currently the disabled alpha...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1146&amp;PID=2994&amp;title=disabled-alpha-icons#2994</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=203">Ark42</a><br /><strong>Subject:</strong> 1146<br /><strong>Posted:</strong> 06 September 2004 at 7:35pm<br /><br />Currently the disabled alpha icons that are autogenerated are greyscaleand alpha blended onto the toolbar, but that is not how Office reallydoes it. Office's icons still resemble the toolbar color when faded out.<br><br><br>Office 2003: <img src="uploads/Ark42/2004-09-06_193220_Office2003.png" border="0" border="0"><br><br><br>Codejock: <img src="uploads/Ark42/2004-09-06_193229_Codejock.png" border="0" border="0"><br><br>Any plans to fix this?]]>
   </description>
   <pubDate>Mon, 06 Sep 2004 19:35:35 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1146&amp;PID=2994&amp;title=disabled-alpha-icons#2994</guid>
  </item> 
 </channel>
</rss>