<?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 : Painting of disabled toolbar button</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Painting of disabled toolbar button]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 10 Jun 2026 11:37:31 +0000</pubDate>
  <lastBuildDate>Thu, 15 Mar 2007 03:01:07 +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=6130</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[Painting of disabled toolbar button : I&amp;#039;m glad that it helped you....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6130&amp;PID=21165&amp;title=painting-of-disabled-toolbar-button#21165</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2014">akur</a><br /><strong>Subject:</strong> 6130<br /><strong>Posted:</strong> 15 March 2007 at 3:01am<br /><br /><DIV>I'm glad that it helped you.</DIV>]]>
   </description>
   <pubDate>Thu, 15 Mar 2007 03:01:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6130&amp;PID=21165&amp;title=painting-of-disabled-toolbar-button#21165</guid>
  </item> 
  <item>
   <title><![CDATA[Painting of disabled toolbar button : Thank you, akur! Now, it works...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6130&amp;PID=21156&amp;title=painting-of-disabled-toolbar-button#21156</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2842">wimix</a><br /><strong>Subject:</strong> 6130<br /><strong>Posted:</strong> 14 March 2007 at 1:03pm<br /><br />Thank you, akur! Now, it works fine.<br><br>I picked the usage of disabled images from the GUI_MsMoney example. It does not set bUseDisabledIcons, so I thought I don't need it too.<br><br>]]>
   </description>
   <pubDate>Wed, 14 Mar 2007 13:03:06 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6130&amp;PID=21156&amp;title=painting-of-disabled-toolbar-button#21156</guid>
  </item> 
  <item>
   <title><![CDATA[Painting of disabled toolbar button : Hello,  just an idea: did you...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6130&amp;PID=21144&amp;title=painting-of-disabled-toolbar-button#21144</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2014">akur</a><br /><strong>Subject:</strong> 6130<br /><strong>Posted:</strong> 14 March 2007 at 1:22am<br /><br />Hello,<DIV>&nbsp;</DIV><DIV>just an idea: did you try to play a little bit with the flags Oleg has told about above? I mean setting/resetting these:</DIV><DIV>&nbsp;</DIV><DIV><FONT face="Courier New, Courier, mono">XTPPaintManager()-&gt;GetIconsInfo()-&gt;bUseDisabledIcons</FONT></DIV><DIV><FONT face="Courier New, Courier, mono">XTPPaintManager()-&gt;GetIconsInfo()-&gt;bOfficeStyleDisabledIcons</FONT></DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 14 Mar 2007 01:22:42 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6130&amp;PID=21144&amp;title=painting-of-disabled-toolbar-button#21144</guid>
  </item> 
  <item>
   <title><![CDATA[Painting of disabled toolbar button : Hi!I&amp;#039;ve got a similar problem...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6130&amp;PID=21133&amp;title=painting-of-disabled-toolbar-button#21133</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2842">wimix</a><br /><strong>Subject:</strong> 6130<br /><strong>Posted:</strong> 13 March 2007 at 3:33pm<br /><br />Hi!<br><br>I've got a similar problem with disabled icons but I use the standard SetIcons functions. <br><br><font face="Courier New, Courier, mono">&nbsp; m_pDocBar-&gt;LoadToolBar(IDR_TOOLBAR_DOC);<br>&nbsp; m_pDocBar-&gt;SetIconSize(CSize(24,24));<br>&nbsp; m_pDocBar-&gt;GetImageManager()-&gt;SetIcons(IDR_TOOLBAR_DOC, IDB_TOOLBAR_DOC, xtpImageNormal);<br>&nbsp; m_pDocBar-&gt;GetImageManager()-&gt;SetIcons(IDR_TOOLBAR_DOC, IDB_TOOLBAR_DOC_DISABLED, xtpImageDisabled);<br><br></font>The disabled icons are not used.<br><br>For testing, I added the disabled icons as hot icons too. They aredisplayed correctly (=disabled icon) when the mouse is over the buttons. <br><br><font face="Courier New, Courier, mono">&nbsp; m_pDocBar-&gt;GetImageManager()-&gt;SetIcons(IDR_TOOLBAR_DOC, IDB_TOOLBAR_DOC_DISABLED, xtpImageHot);<br></font><br>Correct enabled icon but wrong disabled icon:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <img src="uploads/20070313_150512_ic&#111;ns1.JPG" height="155" width="144" border="0"><br><br>For testing: disabled icon in hot state:<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;  <img src="uploads/20070313_150848_ic&#111;n2.JPG" height="142" width="145" border="0"><br><br><br>The main window is derived from CXTPFrameWnd. It's embedded as a child window in a Windows Explorer tool bar. <br><br>Does somebody have an idea?<br><br>Regards<br><br><br>]]>
   </description>
   <pubDate>Tue, 13 Mar 2007 15:33:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6130&amp;PID=21133&amp;title=painting-of-disabled-toolbar-button#21133</guid>
  </item> 
  <item>
   <title><![CDATA[Painting of disabled toolbar button : Thank you oleg, but unfortunately...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6130&amp;PID=19479&amp;title=painting-of-disabled-toolbar-button#19479</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2014">akur</a><br /><strong>Subject:</strong> 6130<br /><strong>Posted:</strong> 18 January 2007 at 9:27am<br /><br />Thank you oleg, but unfortunately this still doesn't work. I've tried the CImageList-based version of <font face="Courier New, Courier, mono">SetIcons()</font> (because we don't have fixed, resource-based toolbars), but the disabled images are too dark grey, again. <img src="http://forum.codejock.com/smileys/smiley22.gif" border="0" align="absmiddle"><br><br>So finally I ended up with overloading <font face="Courier New, Courier, mono"><b><font color="#0000ff">CXTPPaintManager</font><font color="#0000ff">::DrawImage()</font></b></font> to execute my own code for drawing disabled buttons. Just for the information of those who may be interested. Anyway, thank you for your help.<br>]]>
   </description>
   <pubDate>Thu, 18 Jan 2007 09:27:10 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6130&amp;PID=19479&amp;title=painting-of-disabled-toolbar-button#19479</guid>
  </item> 
  <item>
   <title><![CDATA[Painting of disabled toolbar button : Hi,  Don&amp;#039;t use AddCustomIcon,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6130&amp;PID=19438&amp;title=painting-of-disabled-toolbar-button#19438</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 6130<br /><strong>Posted:</strong> 17 January 2007 at 9:29am<br /><br /><P>Hi,</P><DIV>&nbsp;</DIV><DIV>Don't use <FONT face="Courier New">AddCustomIcon, </DIV><DIV></DIV><DIV></DIV>Use standard SetIcons for normal and disabled icons.<DIV></DIV><DIV></DIV>For example:<DIV></DIV><DIV></DIV>// pCommandBars-&gt;GetImageManager()-&gt;SetIcons(IDR_MAINFRAME, xtpImageNormal);<BR>// pCommandBars-&gt;GetImageManager()-&gt;SetIcons(IDR_MAINFRAME, IDR_MAINFRAME_DISABLED, xtpImageDisabled);<BR></FONT>]]>
   </description>
   <pubDate>Wed, 17 Jan 2007 09:29:21 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6130&amp;PID=19438&amp;title=painting-of-disabled-toolbar-button#19438</guid>
  </item> 
  <item>
   <title><![CDATA[Painting of disabled toolbar button : Thank you, it&amp;#039;s much better...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6130&amp;PID=19427&amp;title=painting-of-disabled-toolbar-button#19427</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2014">akur</a><br /><strong>Subject:</strong> 6130<br /><strong>Posted:</strong> 17 January 2007 at 3:01am<br /><br /><font face="Geneva, Arial, Helvetica, sans-serif"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;;"></span></font>Thank you, it's much better now.<br>But it's still not the same for some other icons of mine. Eg. from the enabled icon on the left, I get a bad looking disabled icon on the right:<br><div align="center"><img src="uploads/20070117_025731_1b.JPG" height="106" width="337" border="0"><br></div>I guess this is because of some transparency handling.<br><br>By the way, is there a way to force XTP <b><span style="color: blue;">touse my own versions of disabled, greyed icons?</span></b> I'm trying to usethis code to achieve it:<br><p ="Ms&#111;normal"><span style="font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp; UINT nCustomIconId =m_pToolbar-&gt;GetImageManager()-&gt;AddCustomIcon(CXTPImageManagerIconHandle(hMyIcon));<br>&nbsp;&nbsp;&nbsp; CXTPImageManagerIcon* pCustomIconImage = m_pToolbar-&gt;GetImageManager()-&gt;GetImage(nCustomIconId);<br>&nbsp;&nbsp;&nbsp;pCustomIconImage-&gt;SetDisabledIcon(CXTPImageManagerIconHandle(hMyIconDisabled));<br><br>&nbsp;&nbsp;&nbsp; CXTPControlButton *pButton = new CXTPControlButton();<br>&nbsp;&nbsp;&nbsp; pButton-&gt;SetID(nMyId);<br>&nbsp;&nbsp;&nbsp; pButton-&gt;SetIconId(nCustomIconId);<br>&nbsp;&nbsp;&nbsp; pButton-&gt;SetStyle(xtpButtonIconAndCaptionBelow);<br>&nbsp;&nbsp;&nbsp; m_pToolbar-&gt;GetControls()-&gt;Add(pButton);</span><br><br>and previously I also set <span style="font-family: &quot;Courier New&quot;;">m_pToolbar-&gt;GetPaintManager()-&gt;GetIconsInfo()-&gt;bUseDisabledIcons</span>to use the disabled icons pushed in.<br><br>The problem with this is, that XTP makes these greyed icons of mine even more greyed. Imean my rendered, light grey disabled icons (left icon below) become dark grey when drawn by XTP (see right icon below).Could this <b><span style="color: blue;">extra-greying be switched off</span></b>somehow?<br></p><div align="center"><img src="uploads/20070117_023640_2.JPG" height="106" width="339" border="0"><br></div><br>Thank you, in advance!<br><br><br>]]>
   </description>
   <pubDate>Wed, 17 Jan 2007 03:01:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6130&amp;PID=19427&amp;title=painting-of-disabled-toolbar-button#19427</guid>
  </item> 
  <item>
   <title><![CDATA[Painting of disabled toolbar button : Hi,  try to switch these fal...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6130&amp;PID=19395&amp;title=painting-of-disabled-toolbar-button#19395</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 6130<br /><strong>Posted:</strong> 16 January 2007 at 6:25am<br /><br />Hi,<DIV></DIV><DIV></DIV>try to switch these falgs:<DIV>&nbsp;</DIV><DIV>XTPPaintManager()-&gt;GetIconsInfo()-&gt;bUseDisabledIcons</DIV><DIV>XTPPaintManager()-&gt;GetIconsInfo()-&gt;bOfficeStyleDisabledIcons</DIV>]]>
   </description>
   <pubDate>Tue, 16 Jan 2007 06:25:20 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6130&amp;PID=19395&amp;title=painting-of-disabled-toolbar-button#19395</guid>
  </item> 
  <item>
   <title><![CDATA[Painting of disabled toolbar button : Hello,I use the icon in 1st pic...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6130&amp;PID=19390&amp;title=painting-of-disabled-toolbar-button#19390</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2014">akur</a><br /><strong>Subject:</strong> 6130<br /><strong>Posted:</strong> 16 January 2007 at 2:07am<br /><br />Hello,<br><br>I use the icon in 1st pic in my toolbar button, which - when disabled - was correctly grayed by XTP as on the 2nd pic in <b><font color="#0000ff">v10.1</font></b>. However, with <b><font color="#0000ff">v10.4</font></b>, I get a bad look for the same grayed button (see 3rd pic).<br><br><div align="center"><img src="uploads/20070116_015708_Disabled_Toolba.JPG" height="170" width="494" border="0"><br></div><div align="center">(Images are zoomed)<br></div><br>This is how I add this toolbar button (using the same code in both versions v10.1 and v10.4):<br><br>&nbsp;&nbsp;&nbsp; CXTPControlButton *pButton = new CXTPControlButton();<br>&nbsp;&nbsp;&nbsp; pButton-&gt;SetID( nMyButtonId );<br>&nbsp;&nbsp;&nbsp; pButton-&gt;SetCustomIcon( hMyIcon );<br>&nbsp;&nbsp;&nbsp; pButton-&gt;SetStyle(xtpButtonIconAndCaptionBelow);<br>&nbsp;&nbsp;&nbsp; m_pToolbar-&gt;GetControls()-&gt;Add(pButton);<br>(Disabling of buttons is accomplished by cmd update handlers.)<br><br>Where do you think the problem lies? Why is the shadow differently rendered to gray suddenly?<br><br>Thank you, in advance!<br><br>]]>
   </description>
   <pubDate>Tue, 16 Jan 2007 02:07:08 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6130&amp;PID=19390&amp;title=painting-of-disabled-toolbar-button#19390</guid>
  </item> 
 </channel>
</rss>