<?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 : SOLVED - AddIcon Fault?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : SOLVED - AddIcon Fault?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 15 May 2026 11:03:58 +0000</pubDate>
  <lastBuildDate>Mon, 06 Apr 2009 07:15:29 +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=13856</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[SOLVED - AddIcon Fault? : Hi All,  Ahh - found it. It...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13856&amp;PID=47599&amp;title=solved-addicon-fault#47599</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4223">AndyWilton</a><br /><strong>Subject:</strong> 13856<br /><strong>Posted:</strong> 06 April 2009 at 7:15am<br /><br />Hi All,<DIV>&nbsp;</DIV><DIV>Ahh - found it.&nbsp; It was my fault after all, but I thought I'd share the answer with everyone as it could quite easily catch others out.</DIV><DIV>&nbsp;</DIV><DIV>The AddIcon method requires the handle to the compiled in icon.&nbsp; To obtain this, I use&nbsp;the 'LoadImage' API call&nbsp;with&nbsp;parameters 4 and 5 (desired width and height) set to 0 - default size.</DIV><DIV>&nbsp;</DIV><DIV>The problem is that even though the icon is defined as 16x16, I am getting a handle to an image of 32x32&nbsp;and of course, the ReportControl doesn't like this size for its icons.&nbsp; If I set the width / height parameters of 'LoadImage' to 16x16 then it returns a handle to an image of 16x16 and then of course the ReportControl displays it correctly.</DIV><DIV>&nbsp;</DIV><DIV>Regards,</DIV><DIV>&nbsp;</DIV><DIV>Andy</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Mon, 06 Apr 2009 07:15:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13856&amp;PID=47599&amp;title=solved-addicon-fault#47599</guid>
  </item> 
  <item>
   <title><![CDATA[SOLVED - AddIcon Fault? :   AndyWilton wrote:Hi All,   I&amp;#039;m...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13856&amp;PID=47584&amp;title=solved-addicon-fault#47584</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 13856<br /><strong>Posted:</strong> 05 April 2009 at 2:46am<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by AndyWilton" alt="Originally posted by AndyWilton" style="vertical-align: text-bottom;" /> <strong>AndyWilton wrote:</strong><br /><br />Hi All, <DIV>&nbsp;</DIV><DIV>I'm having trouble getting the AddIcon method working in the ReportControl.&nbsp; I'm familiar with this method and use it with various other controls (eg, CommandBars, ShortcutBar, TaskPanel etc).</DIV><DIV>&nbsp;</DIV><DIV>I have an icon defined which is 16x16.&nbsp; If I use the LoadIcon&nbsp;method then the icon is correctly set for a column, but if I switch to use the AddIcon method it doesn't display.</DIV><DIV>&nbsp;</DIV><DIV>Has anybody used this successfully?</DIV><DIV>&nbsp;</DIV><DIV>Regards,</DIV><DIV>&nbsp;</DIV><DIV>Andy</DIV></td></tr></table> <DIV>&nbsp;</DIV><DIV>Hi,</DIV><DIV>&nbsp;</DIV><DIV>If you use <strong>wndReportControl.Icons.AddBitmap Picture1.Picture.Handle, 1, xtpImage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nbsp;</DIV><DIV>&nbsp;</DIV><DIV>If I use .<strong>AddIcon</strong> it doesn't.&nbsp;Columnheader image supports icons so it should work...&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Sun, 05 Apr 2009 02:46:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13856&amp;PID=47584&amp;title=solved-addicon-fault#47584</guid>
  </item> 
  <item>
   <title><![CDATA[SOLVED - AddIcon Fault? : Hi Mark,  Thanks, I&amp;#039;ll...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13856&amp;PID=47479&amp;title=solved-addicon-fault#47479</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4223">AndyWilton</a><br /><strong>Subject:</strong> 13856<br /><strong>Posted:</strong> 02 April 2009 at 4:26am<br /><br />Hi Mark,<DIV>&nbsp;</DIV><DIV>Thanks, I'll take a closer look at the SetImageList but I'm not convinced I'll be able to use this with Clarion.</DIV><DIV>&nbsp;</DIV><DIV>Interesting, If I use the LoadIcon method with the desired parameters it all works fine, its just the AddIcon method - I can only presume that its faulty.</DIV><DIV>&nbsp;</DIV><DIV>Regards,</DIV><DIV>&nbsp;</DIV><DIV>Andy</DIV>]]>
   </description>
   <pubDate>Thu, 02 Apr 2009 04:26:30 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13856&amp;PID=47479&amp;title=solved-addicon-fault#47479</guid>
  </item> 
  <item>
   <title><![CDATA[SOLVED - AddIcon Fault? : Internally now ReportControl use...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13856&amp;PID=47457&amp;title=solved-addicon-fault#47457</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 13856<br /><strong>Posted:</strong> 01 April 2009 at 11:51am<br /><br /><DIV>Internally now ReportControl use ImageManager this is why I recommended to use it. Call wndReportControl.SetImageList&nbsp;use ImageManager inside ActiveX to pass you params.</DIV><DIV>&nbsp;</DIV><DIV>There&nbsp;is old VB-way to deal with icons. You can try it also. </DIV><DIV>&nbsp;</DIV><DIV>Dim iconArray(0 To 9) As Long<BR></DIV><DIV>&nbsp;&nbsp;&nbsp; 'There are 10 icons in the Bitmap file, the bitmap file is 160x16,<BR>&nbsp;&nbsp;&nbsp; 'which contains 10 16x16 icons. You need to make sure that there is<BR>&nbsp;&nbsp;&nbsp; 'an element in the array for each icon in the Bitmap.<BR>&nbsp;&nbsp;&nbsp; 'Width of icons = Width of Bitmap / number of elements in array<BR>&nbsp;&nbsp;&nbsp; 'I.e. Width of icons = 160/10 = 16<BR>&nbsp;&nbsp;&nbsp; 'IconId can not be Zero (0), so do not assign 0 to any of the array elements<BR>&nbsp;&nbsp;&nbsp; iconArray(0) = COLUMN_MAIL_ICON<BR>&nbsp;&nbsp;&nbsp; iconArray(1) = COLUMN_IMPORTANCE_ICON<BR>&nbsp;&nbsp;&nbsp; iconArray(2) = COLUMN_CHECK_ICON<BR>&nbsp;&nbsp;&nbsp; iconArray(3) = RECORD_UNREAD_MAIL_ICON<BR>&nbsp;&nbsp;&nbsp; iconArray(4) = RECORD_READ_MAIL_ICON<BR>&nbsp;&nbsp;&nbsp; iconArray(5) = RECORD_REPLIED_ICON<BR>&nbsp;&nbsp;&nbsp; iconArray(6) = RECORD_IMPORTANCE_HIGH_ICON<BR>&nbsp;&nbsp;&nbsp; iconArray(7) = COLUMN_ATTACHMENT_ICON<BR>&nbsp;&nbsp;&nbsp; iconArray(8) = COLUMN_ATTACHMENT_NORMAL_ICON<BR>&nbsp;&nbsp;&nbsp; iconArray(9) = RECORD_IMPORTANCE_LOW_ICON</DIV><DIV>&nbsp;&nbsp;&nbsp; 'Passing the iconArray for the "Commands" parameter will add an icon to the collection<BR>&nbsp;&nbsp;&nbsp; 'of icons for each item in the array. So Number of icons added = Number of elements in array.<BR>&nbsp;&nbsp;&nbsp; 'Icon width = Total width of Bitmap/Number of elements in array.<BR>&nbsp;&nbsp;&nbsp; 'The icons will be assigned the index of the array elements as an Index.<BR>&nbsp;&nbsp;&nbsp; wndReportControl.Icons.LoadBitmap App.Path &amp; "\Icons\bmreport.bmp", iconArray, xtpImageNormal<BR></DIV>]]>
   </description>
   <pubDate>Wed, 01 Apr 2009 11:51:14 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13856&amp;PID=47457&amp;title=solved-addicon-fault#47457</guid>
  </item> 
  <item>
   <title><![CDATA[SOLVED - AddIcon Fault? : Hi Mark,   Excuse my ignorance...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13856&amp;PID=47454&amp;title=solved-addicon-fault#47454</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4223">AndyWilton</a><br /><strong>Subject:</strong> 13856<br /><strong>Posted:</strong> 01 April 2009 at 11:37am<br /><br />Hi Mark, <DIV>&nbsp;</DIV><DIV>Excuse my ignorance but doesn't that method&nbsp;require an object whereas all I have is a handle to a compiled in icon - that's why I want to use the AddIcon method.</DIV><DIV>&nbsp;</DIV><DIV>Can you think of any other way to get AddIcon to work?</DIV><DIV>&nbsp;</DIV><DIV>Regards,</DIV><DIV>&nbsp;</DIV><DIV>Andy</DIV>]]>
   </description>
   <pubDate>Wed, 01 Apr 2009 11:37:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13856&amp;PID=47454&amp;title=solved-addicon-fault#47454</guid>
  </item> 
  <item>
   <title><![CDATA[SOLVED - AddIcon Fault? : still try wndReportControl.SetImageList...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13856&amp;PID=47386&amp;title=solved-addicon-fault#47386</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 13856<br /><strong>Posted:</strong> 31 March 2009 at 12:03pm<br /><br />still try wndReportControl.SetImageList YourClarionLoadedIcon]]>
   </description>
   <pubDate>Tue, 31 Mar 2009 12:03:23 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13856&amp;PID=47386&amp;title=solved-addicon-fault#47386</guid>
  </item> 
  <item>
   <title><![CDATA[SOLVED - AddIcon Fault? : Hi Mark,  Unfortunately, the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13856&amp;PID=47367&amp;title=solved-addicon-fault#47367</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4223">AndyWilton</a><br /><strong>Subject:</strong> 13856<br /><strong>Posted:</strong> 31 March 2009 at 4:47am<br /><br />Hi Mark,<DIV>&nbsp;</DIV><DIV>Unfortunately, the language that we use is Clarion and this doesn't support the ImageList function so I can't really use SetImageList.</DIV><DIV>&nbsp;</DIV><DIV>As I mentioned earlier, the AddIcon works perfectly in Clarion for all of the other controls but will not work for the ReportControl - is there something different in this control or does it just not work?</DIV><DIV>&nbsp;</DIV><DIV>Regards,</DIV><DIV>&nbsp;</DIV><DIV>Andy</DIV>]]>
   </description>
   <pubDate>Tue, 31 Mar 2009 04:47:30 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13856&amp;PID=47367&amp;title=solved-addicon-fault#47367</guid>
  </item> 
  <item>
   <title><![CDATA[SOLVED - AddIcon Fault? : try to use wndReportControl.SetImageList...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13856&amp;PID=47339&amp;title=solved-addicon-fault#47339</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 13856<br /><strong>Posted:</strong> 30 March 2009 at 6:55pm<br /><br />try&nbsp; to use wndReportControl.SetImageList YourImageList - you can assign image to ImageList in VB Form Editor and set proper mask to use transperent icons ]]>
   </description>
   <pubDate>Mon, 30 Mar 2009 18:55:34 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13856&amp;PID=47339&amp;title=solved-addicon-fault#47339</guid>
  </item> 
  <item>
   <title><![CDATA[SOLVED - AddIcon Fault? : Hi All,   I&amp;#039;m having trouble...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13856&amp;PID=47319&amp;title=solved-addicon-fault#47319</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4223">AndyWilton</a><br /><strong>Subject:</strong> 13856<br /><strong>Posted:</strong> 30 March 2009 at 12:18pm<br /><br />Hi All, <DIV>&nbsp;</DIV><DIV>I'm having trouble getting the AddIcon method working in the ReportControl.&nbsp; I'm familiar with this method and use it with various other controls (eg, CommandBars, ShortcutBar, TaskPanel etc).</DIV><DIV>&nbsp;</DIV><DIV>I have an icon defined which is 16x16.&nbsp; If I use the LoadIcon&nbsp;method then the icon is correctly set for a column, but if I switch to use the AddIcon method it doesn't display.</DIV><DIV>&nbsp;</DIV><DIV>Has anybody used this successfully?</DIV><DIV>&nbsp;</DIV><DIV>Regards,</DIV><DIV>&nbsp;</DIV><DIV>Andy</DIV>]]>
   </description>
   <pubDate>Mon, 30 Mar 2009 12:18:56 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13856&amp;PID=47319&amp;title=solved-addicon-fault#47319</guid>
  </item> 
 </channel>
</rss>