<?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 : Image from resource</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : XAML Snippets : Image from resource]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 19:10:28 +0000</pubDate>
  <lastBuildDate>Thu, 22 Jan 2009 14:17:47 +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=13070</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[Image from resource : OK, I&amp;#039;ve done a bit of code...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13070&amp;PID=44807&amp;title=image-from-resource#44807</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4140">JerryEvans</a><br /><strong>Subject:</strong> 13070<br /><strong>Posted:</strong> 22 January 2009 at 2:17pm<br /><br />OK, I've done a bit of code sleuthing in the interim<br><br>The markup parser will load a PNG file from a resource if the _XTP_INCLUDE_GRAPHICLIBRARY macro has been defined. <br><br>See XTPImageManager.cpp in the \common folder. <br><br>I believe that the loader maintains any alpha channel in the PNG image - i.e it understands 32bit PNG files as well as 24bit varieties. <br><br>This is <b>excellent</b>, well done team.<br><br>The syntax for the resource file as follows. (I stored these in the RC2 file generated by a VC++ project)<br><br>LOGO PNG DISCARDABLE&nbsp;&nbsp;&nbsp;&nbsp; "res\\nova-logo-320.png"<br><br>or<br><br>100 PNG DISCARDABLE&nbsp;&nbsp;&nbsp;&nbsp; "res\\nova-logo-320.png"<br><br>In the first case the XAML code should be:<br><br>&lt;Image Source="res://LOGO"/&gt;<br><br>and to load up the second the XAML should be<br><br>&lt;Image Source="res://#100"/&gt;<br><br>HTH someone else.<br><br>Jerry<br><br>]]>
   </description>
   <pubDate>Thu, 22 Jan 2009 14:17:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13070&amp;PID=44807&amp;title=image-from-resource#44807</guid>
  </item> 
  <item>
   <title><![CDATA[Image from resource : Oleg:Your example implies that...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13070&amp;PID=44806&amp;title=image-from-resource#44806</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4140">JerryEvans</a><br /><strong>Subject:</strong> 13070<br /><strong>Posted:</strong> 22 January 2009 at 1:53pm<br /><br />Oleg:<br><br>Your example implies that #100 is the bitmap ID - should this equate to a declaration in an RC file like this:<br><br>GLYPH.BMP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BITMAP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "res\\glyph.bmp"<br><br>Are any other file formats are supported? PNG or JPG?<br><br>What about an image stored in the RC_DATA section? For example:<br><br>EXCLAMATION.PNG RCDATA&nbsp; DISCARDABLE&nbsp;&nbsp;&nbsp;&nbsp; "res\\exclamation.png"<br><br>Thanks <br><br>Jerry<br>]]>
   </description>
   <pubDate>Thu, 22 Jan 2009 13:53:34 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13070&amp;PID=44806&amp;title=image-from-resource#44806</guid>
  </item> 
  <item>
   <title><![CDATA[Image from resource : Thanks oleg, adding the resources...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13070&amp;PID=44178&amp;title=image-from-resource#44178</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3688">BobWansink</a><br /><strong>Subject:</strong> 13070<br /><strong>Posted:</strong> 06 January 2009 at 3:38am<br /><br />Thanks oleg, <br><br>adding the resources to the main application won't be a problem. Great!<br><br>Bob<br>]]>
   </description>
   <pubDate>Tue, 06 Jan 2009 03:38:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13070&amp;PID=44178&amp;title=image-from-resource#44178</guid>
  </item> 
  <item>
   <title><![CDATA[Image from resource : Hi, You can use &amp;#034;res://&amp;#034;  &amp;lt;Image...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13070&amp;PID=44175&amp;title=image-from-resource#44175</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 13070<br /><strong>Posted:</strong> 06 January 2009 at 1:49am<br /><br />Hi,<DIV>You can use "res://"</DIV><DIV>&nbsp;</DIV><DIV>&lt;Image Source="res://#100"/&gt;</DIV><DIV>but image have to be located in main exe.</DIV>]]>
   </description>
   <pubDate>Tue, 06 Jan 2009 01:49:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13070&amp;PID=44175&amp;title=image-from-resource#44175</guid>
  </item> 
  <item>
   <title><![CDATA[Image from resource :  Hi everyone,first off, I would...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13070&amp;PID=44136&amp;title=image-from-resource#44136</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3688">BobWansink</a><br /><strong>Subject:</strong> 13070<br /><strong>Posted:</strong> 05 January 2009 at 8:59am<br /><br />Hi everyone,<br><br>first off, I would like to wish everyone here a happy new year.<br><br>on to more serious matters:<br><br>I'm trying to use XAML with localised dll's. These localised dll's contain my XAML resources. I also want it to contain the images i use in the XAML. Currently, I can't seem to make the images visible, even if I add complete, or relative paths to them in the code eg:<br><br>&lt;Image Source="file://somePicture.png"/&gt;<br><br>I would like it best if I could add the images to my localised DLL. That way, my customers wouldn't be able to replace, remove or rename the images on their hard drive. They would just get one dll (resources.dll) which would contain all the necessary files and code.<br><br>In your manual it says:<br><br><h4><i>Loading Images Using XAML:</i></h4><p><i>Images stored in a ImageManager control: To reference an image stored in the ImageManager control, simply set "Source" attribute of an Image element to the id of the image to load. Note for this example there is an image with id "101" in the ImageManager control. </i></p>Is there a way to load the images from my localised dll into the imagemanager? How do i do it? Is there an example? I've tried to look it up in the samples, but came out empty handed. <br><br>I wouldn't mind if the images were loaded from the application resources by the way. I just don't want my customers to be able to "change" the images in any way. (I don't even want them to be aware of them...)<br><br><br>Thanks a million,<br><br>Bob<br>]]>
   </description>
   <pubDate>Mon, 05 Jan 2009 08:59:31 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13070&amp;PID=44136&amp;title=image-from-resource#44136</guid>
  </item> 
 </channel>
</rss>