<?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 : Toolbar ic&#111;ns disappear after SetID()</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Toolbar ic&#111;ns disappear after SetID()]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 15 Apr 2026 16:12:36 +0000</pubDate>
  <lastBuildDate>Wed, 19 May 2004 06:00:49 +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=732</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[Toolbar ic&#111;ns disappear after SetID() : Just the job. Thanks. --- Al. ...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=732&amp;PID=1987&amp;title=toolbar-icons-disappear-after-setid#1987</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=525">Alistair</a><br /><strong>Subject:</strong> 732<br /><strong>Posted:</strong> 19 May 2004 at 6:00am<br /><br /><P>Just the job. Thanks.</P><P>--- Al.</P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Wed, 19 May 2004 06:00:49 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=732&amp;PID=1987&amp;title=toolbar-icons-disappear-after-setid#1987</guid>
  </item> 
  <item>
   <title><![CDATA[Toolbar ic&#111;ns disappear after SetID() : You need to associate an icon...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=732&amp;PID=1975&amp;title=toolbar-icons-disappear-after-setid#1975</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=350">vladsch</a><br /><strong>Subject:</strong> 732<br /><strong>Posted:</strong> 17 May 2004 at 7:07pm<br /><br /><P>You need to associate an icon with the ID&nbsp;with the command bars image manager:</P><P><table width="99%"><tr><td><pre class="BBcode">&nbsp;&nbsp;&nbsp; CXTPCommandBars *pBars = theApp.m_pMainFrame-&gt;GetCommandBars(); // get the pointer to command bars<BR>&nbsp;&nbsp;&nbsp; CXTPImageManager* pImageMgr = pBars-&gt;GetImageManager();</P><P>&nbsp;&nbsp;&nbsp; HICON hIcon = getIcon();</P><P>&nbsp;&nbsp;&nbsp; pImageMgr-&gt;SetIcon(hIcon, getID());</P><P>&nbsp;&nbsp;&nbsp; ::DestroyIcon(hIcon);<BR></pre></td></tr></table></P><P>In my case getIcon() returns the icon handle for the current instance of the command and getID() returns the ID of the command, substitute your own code. Image manager makes a copy of the icon so you will need to destroy the icon after the call to SetIcon.</P>]]>
   </description>
   <pubDate>Mon, 17 May 2004 19:07:14 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=732&amp;PID=1975&amp;title=toolbar-icons-disappear-after-setid#1975</guid>
  </item> 
  <item>
   <title><![CDATA[Toolbar ic&#111;ns disappear after SetID() : I&amp;#039;m currently evaluating...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=732&amp;PID=1947&amp;title=toolbar-icons-disappear-after-setid#1947</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=525">Alistair</a><br /><strong>Subject:</strong> 732<br /><strong>Posted:</strong> 14 May 2004 at 5:22am<br /><br /><P><FONT color=#000000>I'm currently evaluating XTToolkit Pro.</FONT></P><P><FONT color=#000000>I'm trying to implement a toolbar with icons and text. Just simple buttons.</FONT></P><P><FONT color=#000000>It all works fine until I assign a command id to a button so that it will actually do something. When I do that, it no longer shows the icon, just the text!</FONT></P><P><FONT color=#000000>Here's my code (in CMainFrame::OnCreate())</FONT></P><P><FONT color=#000000><table width="99%"><tr><td><pre class="BBcode"></FONT></P><FONT size=2><P></FONT><FONT size=2><FONT face="Arial, Helvetica, sans-serif" color=#000000>// Create PC-BaX ToolBar</FONT></P></FONT><FONT size=2><P><FONT face="Arial, Helvetica, sans-serif" color=#000000>CXTPToolBar* pToolBar = (CXTPToolBar*)</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" color=#000000>pCommandBars-&gt;Add(_T("PC-BaX Tools"), xtpBarTop);</FONT></P><P></FONT><FONT face="Arial, Helvetica, sans-serif" color=#000000 size=2>if</FONT><FONT size=2><FONT face="Arial, Helvetica, sans-serif" color=#000000> ( !pToolBar )</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" color=#000000>{</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" color=#000000>TRACE0("Failed to create toolbar\n");</FONT></P><P></FONT><FONT face="Arial, Helvetica, sans-serif" color=#000000 size=2>return</FONT><FONT size=2><FONT face="Arial, Helvetica, sans-serif" color=#000000> -1;</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" color=#000000>}</FONT></P><P></FONT><FONT size=2><FONT face="Arial, Helvetica, sans-serif" color=#000000>// Load the toolbar</FONT></P></FONT><FONT size=2><P></FONT><FONT face="Arial, Helvetica, sans-serif" color=#000000 size=2>if</FONT><FONT size=2><FONT face="Arial, Helvetica, sans-serif" color=#000000> ( !pToolBar-&gt;LoadToolBar(IDR_TOOLBAR) )</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" color=#000000>{</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" color=#000000>TRACE0("Failed to load toolbar\n");</FONT></P><P></FONT><FONT face="Arial, Helvetica, sans-serif" color=#000000 size=2>return</FONT><FONT size=2><FONT face="Arial, Helvetica, sans-serif" color=#000000> -1;</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" color=#000000>}</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" color=#000000>pToolBar-&gt;ShowTextBelowIcons() ;</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" color=#000000>CXTPControl *pControl ;</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" color=#000000>pControl = pToolBar-&gt;GetControl ( 0 ) ;</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" color=#000000>pControl-&gt;SetID ( ID_ACTION_EXECUTIVE ) ; // &lt;-- This stops the icon from being displayed but is the only way I know to assign an action to a button.</FONT></P></FONT><FONT color=#008000 size=2><P><FONT face="Arial, Helvetica, sans-serif" color=#000000>pControl-&gt;SetCaption ( IDS_EXECUTIVE ) ;</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" color=#000000>pControl-&gt;SetFlags ( pControl-&gt;GetFlags() | xtpFlagManualUpdate ) ;</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" color=#000000>pControl-&gt;SetStyle ( xtpButtonIconAndCaption ) ;</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" color=#000000>pControl-&gt;SetEnabled ( TRUE ) ;</FONT></P><P><FONT face=Arial color=#000000>/*...*/</FONT></P><FONT face=Arial><FONT size=2><P></FONT><FONT size=2><FONT color=#000000>// Set Office 2003 Theme</FONT></P></FONT><FONT color=#000000 size=2><P>CXTPPaintManager::SetTheme(xtpThemeOffice2003);</P></FONT></FONT><P><FONT color=#000000></pre></td></tr></table></FONT></P><P><FONT color=#000000>Any suggestions?</FONT></P><P><FONT color=#000000>--- Al.</FONT></P><P><FONT color=#000000>Ps, how do you change the paragraph settings when posting? I seem to have large spaces between my lines.</FONT></P><P>&nbsp;</P></FONT>]]>
   </description>
   <pubDate>Fri, 14 May 2004 05:22:17 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=732&amp;PID=1947&amp;title=toolbar-icons-disappear-after-setid#1947</guid>
  </item> 
 </channel>
</rss>