<?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 : CXTPDialogs/toolbars/image lists..</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : CXTPDialogs/toolbars/image lists..]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 10 Jun 2026 06:34:47 +0000</pubDate>
  <lastBuildDate>Thu, 28 Sep 2006 14:02:34 +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=5158</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[CXTPDialogs/toolbars/image lists.. : Oleg,  Now I know why you were...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5158&amp;PID=16166&amp;title=cxtpdialogs-toolbars-image-lists#16166</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=374">ddlittle</a><br /><strong>Subject:</strong> 5158<br /><strong>Posted:</strong> 28 September 2006 at 2:02pm<br /><br /><DIV>Oleg,</DIV><DIV>&nbsp;</DIV><DIV>Now I know why you were thinking "this guy doesn't know what he's doing" ---</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>I found out what was was wrong --- Whoever designed this dialog the first time used 24x24 toolbars and I only have images for 16x16 and 32x32.&nbsp; when I changed the toolbar button size from 24x24 to 16x16, all my Icons show up just fine...</DIV><DIV>&nbsp;</DIV><DIV>Thanks!</DIV><DIV>&nbsp;</DIV><DIV>- David</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Thu, 28 Sep 2006 14:02:34 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5158&amp;PID=16166&amp;title=cxtpdialogs-toolbars-image-lists#16166</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPDialogs/toolbars/image lists.. : I create the toolbars a line or...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5158&amp;PID=16165&amp;title=cxtpdialogs-toolbars-image-lists#16165</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=374">ddlittle</a><br /><strong>Subject:</strong> 5158<br /><strong>Posted:</strong> 28 September 2006 at 11:31am<br /><br /><P><FONT face="Arial, Helvetica, sans-serif">I create the toolbars a line or two earlier, then call the function whose code was posted earlier (SetupIcons).</P><DIV></DIV><DIV></DIV>Here's the code:<DIV></DIV><DIV></DIV><DIV><FONT face="Courier New, Courier, mono"></FONT>&nbsp;</DIV><DIV><FONT size=2><P><FONT face="Courier New, Courier, mono">BOOL CCommonAnalysisDialog::CreateToolbar(</FONT></FONT><FONT face="Courier New, Courier, mono"><FONT color=#0000ff size=2>const</FONT><FONT size=2> UINT menuID </FONT><FONT color=#008000 size=2>/* = IDR_STATICMENU */</FONT><FONT size=2>, </FONT><FONT color=#0000ff size=2>const</FONT><FONT size=2> UINT toolBarID </FONT><FONT color=#008000 size=2>/* = IDR_STATICTOOLS */</FONT></FONT><FONT size=2><FONT face="Courier New, Courier, mono">)</FONT></P><P><FONT face="Courier New, Courier, mono">{</FONT></P><P><FONT face="Courier New, Courier, mono">InitCommandBars();</FONT></P><P><FONT face="Courier New, Courier, mono">CXTPCommandBars* pCommandBars = GetCommandBars();</FONT></P><P><FONT face="Courier New, Courier, mono">pCommandBars-&gt;SetMenu(</FONT></FONT><FONT face="Courier New, Courier, mono" color=#800000 size=2>"Menu Bar"</FONT><FONT size=2><FONT face="Courier New, Courier, mono">,menuID);</FONT></P><P><FONT face="Courier New, Courier, mono">CXTPToolBar* pToolBar = pCommandBars-&gt;Add(</FONT></FONT><FONT face="Courier New, Courier, mono" color=#800000 size=2>"Standard"</FONT><FONT size=2><FONT face="Courier New, Courier, mono">,xtpBarTop);</FONT></P><P><FONT face="Courier New, Courier, mono">pToolBar-&gt;LoadToolBar(toolBarID);</FONT></P><P><FONT face="Courier New, Courier, mono">RepositionControls();</FONT></P><P><FONT face="Courier New, Courier, mono">SetupIcons(</FONT></FONT><FONT face="Courier New, Courier, mono"><FONT color=#0000ff size=2>sizeof</FONT><FONT size=2>(iconIDs)/</FONT><FONT color=#0000ff size=2>sizeof</FONT><FONT size=2>(iconIDs&#091;0&#093;),(</FONT><FONT color=#0000ff size=2>const</FONT></FONT><FONT size=2><FONT face="Courier New, Courier, mono"> UINT*)&amp;iconIDs);</FONT></P><P><FONT face="Courier New, Courier, mono">pCommandBars-&gt;GetShortcutManager()-&gt;SetAccelerators(menuID);</FONT></P><P></FONT><FONT face="Courier New, Courier, mono" color=#0000ff size=2>return</FONT><FONT size=2><FONT face="Courier New, Courier, mono"> TRUE;</FONT></P><P><FONT face="Courier New, Courier, mono">}</FONT></P></FONT></DIV></FONT>]]>
   </description>
   <pubDate>Thu, 28 Sep 2006 11:31:35 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5158&amp;PID=16165&amp;title=cxtpdialogs-toolbars-image-lists#16165</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPDialogs/toolbars/image lists.. : In this code you add icons to...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5158&amp;PID=16153&amp;title=cxtpdialogs-toolbars-image-lists#16153</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 5158<br /><strong>Posted:</strong> 28 September 2006 at 9:00am<br /><br />In this code you add icons to imagemanager. but not buttons to toobar.<DIV>&nbsp;</DIV><DIV>See CXTPCommandBar::SetButtons method or</DIV><DIV>CXTPControls::Add</DIV>]]>
   </description>
   <pubDate>Thu, 28 Sep 2006 09:00:52 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5158&amp;PID=16153&amp;title=cxtpdialogs-toolbars-image-lists#16153</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPDialogs/toolbars/image lists.. : I have an app that&amp;#039;s based...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5158&amp;PID=16124&amp;title=cxtpdialogs-toolbars-image-lists#16124</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=374">ddlittle</a><br /><strong>Subject:</strong> 5158<br /><strong>Posted:</strong> 27 September 2006 at 10:58am<br /><br />I have an app that's based on CXTPDialog - I have a toolbar on it and everything there works fine.&nbsp; Now I want to add my standard buttons, but can't seem to make that work.<DIV>&nbsp;</DIV><DIV>This is the code I use for all apps with a frame --</DIV><DIV>&nbsp;</DIV><FONT size=2><P><FONT face="Courier New, Courier, mono">CImageList imgList32;</FONT></P><P><FONT face="Courier New, Courier, mono">CImageList imgList16;</FONT></P><P><FONT face="Courier New, Courier, mono">HRESULT hr;</FONT></P><P><FONT face="Courier New, Courier, mono">imgList32.Create(32,32,ILC_COLORDDB|ILC_MASK,0,1);</FONT></P><P><FONT face="Courier New, Courier, mono">imgList16.Create(16,16,ILC_COLORDDB|ILC_MASK,0,1);</FONT></P><P><FONT face="Courier New, Courier, mono">stdButtons = </FONT></FONT><FONT face="Courier New, Courier, mono" color=#0000ff size=2>new</FONT><FONT size=2><FONT face="Courier New, Courier, mono"> UINT&#091;btnCount&#093;;</FONT></P><P></FONT><FONT face="Courier New, Courier, mono"><FONT color=#0000ff size=2>for</FONT><FONT size=2>(</FONT><FONT color=#0000ff size=2>int</FONT></FONT><FONT size=2><FONT face="Courier New, Courier, mono"> x=0;x&lt;btnCount;x++)</FONT></P><P><FONT face="Courier New, Courier, mono">{</FONT></P><P><FONT face="Courier New, Courier, mono">stdButtons&#091;x&#093; = iconIds&#091;x&#093;.cmd;</FONT></P><P><FONT face="Courier New, Courier, mono">HICON hIcon = ::LoadIcon(iconInst,MAKEINTRESOURCE(iconIds&#091;x&#093;.icon));</FONT></P><P></FONT><FONT face="Courier New, Courier, mono" color=#0000ff size=2>if</FONT><FONT size=2><FONT face="Courier New, Courier, mono">(!hIcon)</FONT></P><P><FONT face="Courier New, Courier, mono">{</FONT></P><P><FONT face="Courier New, Courier, mono">hIcon = AfxGetApp()-&gt;LoadStandardIcon(IDI_QUESTION);</FONT></P><P><FONT face="Courier New, Courier, mono">}</FONT></P><P><FONT face="Courier New, Courier, mono">imgList32.Add(hIcon); </FONT></FONT><FONT color=#008000 size=2><FONT face="Courier New, Courier, mono">// load the 32x32 one</FONT></P></FONT><FONT size=2><P><FONT face="Courier New, Courier, mono">imgList16.Add(hIcon); </FONT></FONT><FONT color=#008000 size=2><FONT face="Courier New, Courier, mono">// and the 16x16</FONT></P></FONT><FONT size=2><P><FONT face="Courier New, Courier, mono">}</FONT></P><P></FONT><FONT color=#008000 size=2><FONT face="Courier New, Courier, mono">// now set both sizes of the images for XTP...</FONT></P></FONT><FONT size=2><P><FONT face="Courier New, Courier, mono">hr= XTPImageManager()-&gt;SetIcons((CImageList&amp;)imgList32,stdButtons,btnCount,CSize(32,32));</FONT></P><P><FONT face="Courier New, Courier, mono">hr= XTPImageManager()-&gt;SetIcons((CImageList&amp;)imgList16,stdButtons,btnCount,CSize(16,16));</P><DIV></DIV><FONT size=2><P>SAFE_DELETE(stdButtons);</P><P>FreeLibrary(iconInst);</P><P></FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> TRUE;</P><DIV></DIV><DIV>}</DIV><DIV><FONT face="Arial, Helvetica, sans-serif"></FONT>&nbsp;</DIV><DIV><FONT face=Arial>But that doesn't seem to work.&nbsp; I can't get the "toolbar customize" thing to work on this toolbar, either.&nbsp; Maybe that's a related issue?</FONT></DIV><DIV><FONT face=Arial></FONT>&nbsp;</DIV><DIV><FONT face=Arial>Thanks!</FONT></DIV><DIV><FONT face=Arial></FONT>&nbsp;</DIV><DIV><FONT face=Arial>- David</FONT></FONT></FONT></FONT></DIV>]]>
   </description>
   <pubDate>Wed, 27 Sep 2006 10:58:03 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5158&amp;PID=16124&amp;title=cxtpdialogs-toolbars-image-lists#16124</guid>
  </item> 
 </channel>
</rss>