<?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 : GUI Resource Problem</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : GUI Resource Problem]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 13 Jun 2026 14:03:27 +0000</pubDate>
  <lastBuildDate>Mon, 01 Oct 2007 13:40:41 +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=6428</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[GUI Resource Problem : HI,  If you use CommandBars/PaintManager...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6428&amp;PID=26721&amp;title=gui-resource-problem#26721</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 6428<br /><strong>Posted:</strong> 01 October 2007 at 1:40pm<br /><br />HI,<DIV>&nbsp;</DIV><DIV>If you use CommandBars/PaintManager only with this dialog, you can free all PaintManager:</DIV><DIV>&nbsp;</DIV><DIV>CXTPPaintManager::Done()</DIV>]]>
   </description>
   <pubDate>Mon, 01 Oct 2007 13:40:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6428&amp;PID=26721&amp;title=gui-resource-problem#26721</guid>
  </item> 
  <item>
   <title><![CDATA[GUI Resource Problem : Ok, that solved a part of the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6428&amp;PID=26710&amp;title=gui-resource-problem#26710</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2498">Tsenoh</a><br /><strong>Subject:</strong> 6428<br /><strong>Posted:</strong> 01 October 2007 at 10:04am<br /><br />Ok, that solved a part of the problem.<DIV>Thanks a lot!</DIV><DIV>Other leaks are probably in our code.</DIV><DIV></DIV>Some other thing, I see that Fonts are stored&nbsp;with each&nbsp;CXTPRibbonBar instance. Probably again in the Theme. They don't take up much space, but it would be nice if I could destroy them too.]]>
   </description>
   <pubDate>Mon, 01 Oct 2007 10:04:22 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6428&amp;PID=26710&amp;title=gui-resource-problem#26710</guid>
  </item> 
  <item>
   <title><![CDATA[GUI Resource Problem : Hi, Call  ((CXTPOffice2007T...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6428&amp;PID=26680&amp;title=gui-resource-problem#26680</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 6428<br /><strong>Posted:</strong> 01 October 2007 at 5:59am<br /><br /><DIV>Hi,</DIV><DIV>Call</DIV><DIV>&nbsp;</DIV><DIV>((CXTPOffice2007Theme*)pCommandBars-&gt;GetPaintManager())-&gt;GetImages()-&gt;RemoveAll();</DIV>]]>
   </description>
   <pubDate>Mon, 01 Oct 2007 05:59:25 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6428&amp;PID=26680&amp;title=gui-resource-problem#26680</guid>
  </item> 
  <item>
   <title><![CDATA[GUI Resource Problem : I see. I know the problem now....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6428&amp;PID=26678&amp;title=gui-resource-problem#26678</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2498">Tsenoh</a><br /><strong>Subject:</strong> 6428<br /><strong>Posted:</strong> 01 October 2007 at 5:47am<br /><br />I see. I know the problem now. We are not destroying the Dialog Object, so the CXTPOffice2007Images isn't destroyed as well. Is there a possibility to empty that map and destroy it's elements other than destroying the Object itself?<DIV></DIV><DIV></DIV>Thanks!]]>
   </description>
   <pubDate>Mon, 01 Oct 2007 05:47:57 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6428&amp;PID=26678&amp;title=gui-resource-problem#26678</guid>
  </item> 
  <item>
   <title><![CDATA[GUI Resource Problem : Hi,  Images are stored in CXTPOffice2007Images...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6428&amp;PID=26624&amp;title=gui-resource-problem#26624</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 6428<br /><strong>Posted:</strong> 29 September 2007 at 1:54am<br /><br /><DIV>Hi,</DIV><DIV>&nbsp;</DIV><DIV>Images are stored in CXTPOffice2007Images class&nbsp;and will be destroyed after skin changed or in destructor of this class.</DIV><DIV>&nbsp;</DIV><DIV>Better attach code you use in your dialog, I will check where you forget to free resources. </DIV><DIV>Our library doesn't have memory leaks.</DIV>]]>
   </description>
   <pubDate>Sat, 29 Sep 2007 01:54:23 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6428&amp;PID=26624&amp;title=gui-resource-problem#26624</guid>
  </item> 
  <item>
   <title><![CDATA[GUI Resource Problem : Hi, again! Please consider following...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6428&amp;PID=26613&amp;title=gui-resource-problem#26613</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2498">Tsenoh</a><br /><strong>Subject:</strong> 6428<br /><strong>Posted:</strong> 28 September 2007 at 1:48pm<br /><br /><P>Hi, again!</P><P>Please consider following code:</P><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV>void CXTPRibbonTheme::FillGroupPopupToolBar(CDC* pDC, CXTPRibbonGroup* pGroup, CXTPCommandBar* pCommandBar)<BR>{<BR>&nbsp;pDC-&gt;SetBkMode(TRANSPARENT);</DIV><P>&nbsp;CXTPClientRect rcRibbon(pCommandBar);</P><P>&nbsp;pDC-&gt;FillSolidRect(rcRibbon, RGB(191, 219, 255));</P><P>&nbsp;rcRibbon.InflateRect(3, 3);<BR>&nbsp;XTPRibbonTabContextColor tabColor = pGroup-&gt;GetParentTab()-&gt;GetContextColor();</P><P>&nbsp;if (tabColor != xtpRibbonTabContextColorNone)<BR>&nbsp;{<BR>&nbsp;&nbsp;CXTPOffice2007Image* pImage = LoadImage(FormatName(_T("CONTEXTTAB%sCLIENT"), GetColorName(tabColor)));<BR>&nbsp;&nbsp;if (pImage) pImage-&gt;DrawImage(pDC, rcRibbon, pImage-&gt;GetSource(0, 1), CRect(8, 8, 8, 8));<BR>&nbsp;}<BR>&nbsp;else<BR>&nbsp;{<BR>&nbsp;&nbsp;CXTPOffice2007Image* pImage = LoadImage(FormatName(_T("RIBBONGROUPS")));<BR>&nbsp;&nbsp;if (pImage) pImage-&gt;DrawImage(pDC, rcRibbon, pImage-&gt;GetSource(0, 1), CRect(8, 8, 8, 8));<BR>&nbsp;}<BR>}<BR></pre></td></tr></table></P><DIV>pImage is never deleted. Is that a leak, or am I missing something and that objects are destroyed elsewhere? Thanks!</DIV>]]>
   </description>
   <pubDate>Fri, 28 Sep 2007 13:48:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6428&amp;PID=26613&amp;title=gui-resource-problem#26613</guid>
  </item> 
  <item>
   <title><![CDATA[GUI Resource Problem : Hi! I&amp;#039;ve now checked my...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6428&amp;PID=26605&amp;title=gui-resource-problem#26605</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2498">Tsenoh</a><br /><strong>Subject:</strong> 6428<br /><strong>Posted:</strong> 28 September 2007 at 11:07am<br /><br />Hi!<DIV>I've now checked my application using following tool: <a href="http://www.download.com/DPusLight/3000-2218_4-10424495.html?tag=pdp_prod" target="_blank">http://www.download.com/DPusLight/3000-2218_4-10424495.html?tag=pdp_prod</A></DIV><DIV>&nbsp;</DIV><DIV>It shows that resources created by CreateCompatibleBitmap are&nbsp;not freed untill I destroy the dialog. I am never calling CreateCompatibleBitmap myself for theese icons (in the tool there is an image of the resources in question), so it has to be somewhere in the XTP code.</DIV><DIV>However, those resources are not created each time I show the dialog, so it is not really a leak.&nbsp;It seems to me that is some kind of cache for the bitmaps that are to be drawn on the ribbon.</DIV><DIV>Is there a possibility to disable it? Since my application has hundreds of dialogs that are dynamicaly created, the GDI Resource count pretty soon reaches the magic number 10.000.</DIV><DIV>&nbsp;</DIV><DIV>Any ideas?</DIV><DIV>&nbsp;</DIV><DIV>Thanks!</DIV>]]>
   </description>
   <pubDate>Fri, 28 Sep 2007 11:07:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6428&amp;PID=26605&amp;title=gui-resource-problem#26605</guid>
  </item> 
  <item>
   <title><![CDATA[GUI Resource Problem : If I understood corectly. When...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6428&amp;PID=20591&amp;title=gui-resource-problem#20591</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2498">Tsenoh</a><br /><strong>Subject:</strong> 6428<br /><strong>Posted:</strong> 20 February 2007 at 9:57am<br /><br />If I understood corectly. When using SetIcons, icons are mapped through controll message id. We use our own message system, and the ID's are only unique within a dialog. Not within the application. That is why I use SetCustomIcon.]]>
   </description>
   <pubDate>Tue, 20 Feb 2007 09:57:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6428&amp;PID=20591&amp;title=gui-resource-problem#20591</guid>
  </item> 
  <item>
   <title><![CDATA[GUI Resource Problem : Hello, SetCustomIcon each time...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6428&amp;PID=20562&amp;title=gui-resource-problem#20562</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 6428<br /><strong>Posted:</strong> 20 February 2007 at 2:03am<br /><br />Hello,<DIV>SetCustomIcon each time reserves new Id for Icon. I very recommend yo use SetIcons method instead.</DIV>]]>
   </description>
   <pubDate>Tue, 20 Feb 2007 02:03:03 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6428&amp;PID=20562&amp;title=gui-resource-problem#20562</guid>
  </item> 
  <item>
   <title><![CDATA[GUI Resource Problem : HI Tsenoh,  You can try using...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6428&amp;PID=20547&amp;title=gui-resource-problem#20547</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1">kstowell</a><br /><strong>Subject:</strong> 6428<br /><strong>Posted:</strong> 19 February 2007 at 12:37pm<br /><br />HI Tsenoh,<DIV>&nbsp;</DIV><DIV>You can try using CXTPImageManagerIconHandle instead of HICON. This will automatically clean up your icon resources when the object is destroyed.</DIV><DIV>&nbsp;</DIV><DIV>Instead of:<BR>HICON hIcon = <BR><BR>Use:<BR>CXTPImageManagerIconHandle hIcon =<BR><BR>Hope this helps.</DIV><DIV>&nbsp;</DIV><DIV>Regards,</DIV><DIV>Kirk Stowell</DIV>]]>
   </description>
   <pubDate>Mon, 19 Feb 2007 12:37:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6428&amp;PID=20547&amp;title=gui-resource-problem#20547</guid>
  </item> 
 </channel>
</rss>