<?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 : destructor blows up</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : destructor blows up]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 18 Apr 2026 14:58:31 +0000</pubDate>
  <lastBuildDate>Thu, 09 Apr 2009 10:00:26 +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=13955</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[destructor blows up : I totally not understand why having...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13955&amp;PID=47728&amp;title=destructor-blows-up#47728</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 13955<br /><strong>Posted:</strong> 09 April 2009 at 10:00am<br /><br />I totally not understand why having access to the source you are doing some guess, try and die steps instead of analyzing given source.]]>
   </description>
   <pubDate>Thu, 09 Apr 2009 10:00:26 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13955&amp;PID=47728&amp;title=destructor-blows-up#47728</guid>
  </item> 
  <item>
   <title><![CDATA[destructor blows up : p.s. these icons came from the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13955&amp;PID=47708&amp;title=destructor-blows-up#47708</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2967">adrien</a><br /><strong>Subject:</strong> 13955<br /><strong>Posted:</strong> 09 April 2009 at 2:18am<br /><br />p.s. these icons came from the OS shell, there's no image list etc etc.]]>
   </description>
   <pubDate>Thu, 09 Apr 2009 02:18:02 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13955&amp;PID=47708&amp;title=destructor-blows-up#47708</guid>
  </item> 
  <item>
   <title><![CDATA[destructor blows up : I only want one image manager.,  But...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13955&amp;PID=47707&amp;title=destructor-blows-up#47707</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2967">adrien</a><br /><strong>Subject:</strong> 13955<br /><strong>Posted:</strong> 09 April 2009 at 2:17am<br /><br />I only want one image manager.,<DIV>&nbsp;</DIV><DIV>But by default CXTPReportControl creates its own new one.</DIV><DIV>&nbsp;</DIV><DIV>I want it to use the singleton global one, so I called SetImageManager(XTPImageManager())</DIV><DIV>&nbsp;</DIV><DIV>that's when it started blowing up.</DIV><DIV>&nbsp;</DIV><DIV>So yes, I only want there to be one, but the library wants one for every control so that it can delete it when it is deleted itself.</DIV>]]>
   </description>
   <pubDate>Thu, 09 Apr 2009 02:17:27 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13955&amp;PID=47707&amp;title=destructor-blows-up#47707</guid>
  </item> 
  <item>
   <title><![CDATA[destructor blows up : The question is - why you need...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13955&amp;PID=47704&amp;title=destructor-blows-up#47704</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 13955<br /><strong>Posted:</strong> 08 April 2009 at 11:11pm<br /><br />The question is - why you need more then one ImageManager? You can use many ImageList in one ImageManager if you properly add <DIV><FONT color=#008000 size=2><P>//BOOL CXTPImageManager::SetImageList(UINT nBitmap, int cx, int nBaseCommand, COLORREF clrMask)</P><P>//CXTPImageManagerIcon* CXTPImageManager::GetImage(UINT nCommand, int nWidth = 16) const;</P></FONT><FONT size=2><P>wndReport.GetImageManager()-&gt;SetImageList(IDB_ICONVIEWTEST, 32, 0, RGB(255, 0, 255));</P><P>wndReport.GetImageManager()-&gt;SetImageList(IDB_ICONVIEWTESTSMALL, 16, 1, RGB(255, 0, 255));</P></FONT></DIV>]]>
   </description>
   <pubDate>Wed, 08 Apr 2009 23:11:42 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13955&amp;PID=47704&amp;title=destructor-blows-up#47704</guid>
  </item> 
  <item>
   <title><![CDATA[destructor blows up : in the end, I had to put the code  CXTPImageManager*...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13955&amp;PID=47701&amp;title=destructor-blows-up#47701</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2967">adrien</a><br /><strong>Subject:</strong> 13955<br /><strong>Posted:</strong> 08 April 2009 at 10:28pm<br /><br />in the end, I had to put the code<DIV>&nbsp;</DIV><DIV>&nbsp;CXTPImageManager* pImageManager = new CXTPImageManager();<BR>&nbsp;pImageManager-&gt;AddIcons(XTPImageManager());<BR>&nbsp;Ctrl.SetImageManager(pImageManager);<BR></DIV><DIV>into my OnUpdate function (this is a ReportView).</DIV><DIV>&nbsp;</DIV><DIV>this was so it could get the new icons added to the global.</DIV><DIV>&nbsp;</DIV><DIV>Seems like a waste.&nbsp;&nbsp; If you could just tell it to share the global list would be much more efficient.</DIV>]]>
   </description>
   <pubDate>Wed, 08 Apr 2009 22:28:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13955&amp;PID=47701&amp;title=destructor-blows-up#47701</guid>
  </item> 
  <item>
   <title><![CDATA[destructor blows up : Hi  There&amp;#039;s a problem with...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13955&amp;PID=47700&amp;title=destructor-blows-up#47700</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2967">adrien</a><br /><strong>Subject:</strong> 13955<br /><strong>Posted:</strong> 08 April 2009 at 10:25pm<br /><br />Hi<DIV>&nbsp;</DIV><DIV>There's a problem with a report control I have, it blows up in its destructor when it tries to release the image manager.</DIV><DIV>&nbsp;</DIV><DIV>Problem is, I've set the image manager for the control like this:</DIV><DIV>&nbsp;</DIV><DIV>Ctrl.SetImageManager(XTPImageManager());</DIV><DIV>&nbsp;</DIV><DIV>This sets it to the global static image manager which therefore must not be deleted.</DIV><DIV>&nbsp;</DIV><DIV><DIV>The icons were originally added to the global static image manager by calling AddCustomIcon.&nbsp; Does this put it in some other container or something?</DIV><DIV>&nbsp;</DIV></DIV><DIV>I've tried copying the image manager, but if you use</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;CXTPImageManager* pImageManager = new CXTPImageManager();<BR>&nbsp;pImageManager-&gt;AddIcons(XTPImageManager());</DIV><DIV>&nbsp;Ctrl.SetImageManager(pImageManager);<BR></DIV><DIV>&nbsp;</DIV><DIV>then it loses the map of ID to icon,&nbsp; It shouldn't since the code looks like it's trying to keep the ID.&nbsp; I can see where it sets the custom icon into the map of m_mapImages at the custom ID point, so copying the list should work.</DIV><DIV>&nbsp;</DIV><DIV>I also tried calling</DIV><DIV>&nbsp;</DIV><DIV>Ctrl.SetImageManager(NULL)</DIV><DIV>&nbsp;</DIV><DIV>prior to the destructor to try and get it to not delete the global static, but that doesn't work either. since it checks first to see if I'm passing in NULL.&nbsp; It calls InternalRelease on it anyway so I suppose this will blow up as well.</DIV><DIV>&nbsp;</DIV><DIV>p.s. I don't know why the Image Manager needs to be a CommandTarget.</DIV><DIV>&nbsp;</DIV><DIV>It would be nice if instead you could just direct a control to use the global one instead of trying to take ownership of it.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 08 Apr 2009 22:25:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13955&amp;PID=47700&amp;title=destructor-blows-up#47700</guid>
  </item> 
 </channel>
</rss>