<?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 : using setcustomicon functionality</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : using setcustomicon functionality]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 05 Apr 2026 23:05:02 +0000</pubDate>
  <lastBuildDate>Mon, 14 Aug 2006 09:09:50 +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=4743</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[using setcustomicon functionality : Don&amp;#039;t use SetCustomIcon for...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4743&amp;PID=14860&amp;title=using-setcustomicon-functionality#14860</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 4743<br /><strong>Posted:</strong> 14 August 2006 at 9:09am<br /><br />Don't use SetCustomIcon for this porpose.<DIV>&nbsp;</DIV><DIV>Add icon to ImageManager:</DIV><DIV>&nbsp;</DIV><DIV>pCommandBars-&gt;GetImageManager()-&gt;SetIcon(...);</DIV>]]>
   </description>
   <pubDate>Mon, 14 Aug 2006 09:09:50 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4743&amp;PID=14860&amp;title=using-setcustomicon-functionality#14860</guid>
  </item> 
  <item>
   <title><![CDATA[using setcustomicon functionality : Hmmm, discovered a few issues...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4743&amp;PID=14751&amp;title=using-setcustomicon-functionality#14751</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2173">Bart</a><br /><strong>Subject:</strong> 4743<br /><strong>Posted:</strong> 08 August 2006 at 5:16am<br /><br />Hmmm, discovered a few issues though: <DIV>&nbsp;</DIV><DIV>When using this on CXTPControlPopupColor, it doesnt redraw properly if done from the UpdateUI handler (C++). When you move the mouse over it, the icon changes, but drawing is still wrong, as then the displayed color is no longer visible....</DIV><DIV>&nbsp;</DIV><DIV>I'll thing I'll try to make 2 buttons, only showing the one thats applicable, even though that will make for some odd code and duplicate UI handling <img src="https://forum.codejock.com/smileys/smiley19.gif" border="0">. Another option is chaning the overall toolbar's bitmap - if that can be changed runtime, but that has the disadvantage of duplicating the bitmap, </DIV><DIV>&nbsp;</DIV><DIV>SetCustomIcon sounds nice, but in this case not a solution, unless I'm doing something wrong?</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 08 Aug 2006 05:16:10 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4743&amp;PID=14751&amp;title=using-setcustomicon-functionality#14751</guid>
  </item> 
  <item>
   <title><![CDATA[using setcustomicon functionality : Exactly what I needed! (well,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4743&amp;PID=14745&amp;title=using-setcustomicon-functionality#14745</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2173">Bart</a><br /><strong>Subject:</strong> 4743<br /><strong>Posted:</strong> 08 August 2006 at 1:26am<br /><br />Exactly what I needed! (&#091;edit&#093;well, unless using CXTPControlPopupColor, see below...)<BR>Thank you for your contribution and help!]]>
   </description>
   <pubDate>Tue, 08 Aug 2006 01:26:27 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4743&amp;PID=14745&amp;title=using-setcustomicon-functionality#14745</guid>
  </item> 
  <item>
   <title><![CDATA[using setcustomicon functionality : Hi, Now i could be able to set...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4743&amp;PID=14744&amp;title=using-setcustomicon-functionality#14744</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2133">venkyhyd</a><br /><strong>Subject:</strong> 4743<br /><strong>Posted:</strong> 07 August 2006 at 11:14pm<br /><br />Hi,<DIV>Now i could be able to set the custom icon at runtime using the following code</DIV><DIV>//to get the handle to a particular button in the toolbar</DIV><DIV><FONT size=2><P>CXTPCommandBars* pCommandBars = GetCommandBars();</P><P>CXTPToolBar* pMYTOOLBAR=pCommandBars-&gt;GetToolBar(IDR_MAINFRAME);</P><P></FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2> i=pMYTOOLBAR-&gt;GetControls()-&gt;GetCount();</P><P>CXTPControl* pControl=pMYTOOLBAR-&gt;GetControls()-&gt;GetAt(1);//here i am trying to get handle for the second button</P><FONT size=2><DIV>//To get the handle to the icon IDI_ATOM present in the resources</DIV><DIV>pControl-&gt;SetIconId(IDI_ATOM);</DIV><P>HICON hIcon; </P><P>hIcon = AfxGetApp()-&gt;LoadIcon(IDI_ATOM); </P><P>pControl-&gt;SetCustomIcon(hIcon);//loading the icon onto the control</P><DIV>Hope this is clear enough<img src="https://forum.codejock.com/smileys/smiley1.gif" border="0"></DIV></FONT></FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV>]]>
   </description>
   <pubDate>Mon, 07 Aug 2006 23:14:57 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4743&amp;PID=14744&amp;title=using-setcustomicon-functionality#14744</guid>
  </item> 
  <item>
   <title><![CDATA[using setcustomicon functionality : I&amp;#039;d like to do the same thing...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4743&amp;PID=14730&amp;title=using-setcustomicon-functionality#14730</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2173">Bart</a><br /><strong>Subject:</strong> 4743<br /><strong>Posted:</strong> 07 August 2006 at 7:56am<br /><br />I'd like to do the same thing actually, replacing a toolbar button image at runtime. Or is this only possible by re-setting the entire toolbar image (used in the creation process?).<DIV></DIV>]]>
   </description>
   <pubDate>Mon, 07 Aug 2006 07:56:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4743&amp;PID=14730&amp;title=using-setcustomicon-functionality#14730</guid>
  </item> 
  <item>
   <title><![CDATA[using setcustomicon functionality : Hi,  i want to load a icon from...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4743&amp;PID=14716&amp;title=using-setcustomicon-functionality#14716</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2133">venkyhyd</a><br /><strong>Subject:</strong> 4743<br /><strong>Posted:</strong> 05 August 2006 at 7:36am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>i want to load a icon from the resources on to the toolbar button.</DIV><DIV>i am getting the handle to the desired control with the following code.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><FONT size=2><P>CXTPCommandBars* pCommandBars = GetCommandBars();</P><P>CXTPToolBar* pMYTOOLBAR=pCommandBars-&gt;GetToolBar(IDR_MAINFRAME);</P><DIV></FONT><FONT size=2>CXTPControl* pControl=pMYTOOLBAR-&gt;GetControls()-&gt;GetAt(1);</FONT><FONT color=#008000 size=2></DIV></FONT><P><FONT size=2>Can yoy please&nbsp;help me&nbsp;in using setcustomicon function to load an icon(say IDR_NEWICON from the resources)</P><DIV></DIV><P>Thanks</P><P></FONT>&nbsp;</P>]]>
   </description>
   <pubDate>Sat, 05 Aug 2006 07:36:11 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4743&amp;PID=14716&amp;title=using-setcustomicon-functionality#14716</guid>
  </item> 
 </channel>
</rss>