<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>al_set_display_icon() from executable</title>
		<link>http://www.allegro.cc/forums/view/607514</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Fri, 03 Jun 2011 23:35:55 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Okay, I&#39;ve added the icon to the executable using a resource file and don&#39;t want to also include it as a png. Is there a way I can get the icon from the executable file and use al_set_display_icon() on it?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Desmond Taylor)</author>
		<pubDate>Fri, 03 Jun 2011 21:42:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Why do you need to call <span class="source-code"><a href="http://www.allegro.cc/manual/al_set_display_icon"><span class="a">al_set_display_icon</span></a><span class="k2">(</span><span class="k2">)</span></span> if the icon is already embedded in the executable?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Fri, 03 Jun 2011 21:56:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>To set the window icon <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> I want my game to run in both fullscreen and windoed mode and in windowed I need the icon to be attached to the window.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Desmond Taylor)</author>
		<pubDate>Fri, 03 Jun 2011 21:58:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Shouldn&#39;t it automatically set the icon to the one that&#39;s associated with the program? That&#39;s what I&#39;d expect anyway.<br />I guess you&#39;re using Windows though, and I have no idea how this works there...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Fri, 03 Jun 2011 22:49:02 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>No it doesn&#39;t <img src="http://www.allegro.cc/forums/smileys/sad.gif" alt=":(" /> And yea I&#39;m using Windows 7 32bit.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Desmond Taylor)</author>
		<pubDate>Fri, 03 Jun 2011 23:03:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The problem is likely this line: <a href="http://allefant.com/gtags/S/2046.html#L868">http://allefant.com/gtags/S/2046.html#L868</a></p><p>If someone knows how to instead set the .exe icon there that would be nice of course. For now it should be easy enough providing the icon as a .png file and setting with <span class="source-code"><a href="http://www.allegro.cc/manual/al_set_display_icon"><span class="a">al_set_display_icon</span></a></span> though.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Fri, 03 Jun 2011 23:12:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>A4 has a mechanism that let you include an &quot;allegro_icon&quot; resource that it would load and set for the window initially. We should probably do something similar for A5.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Fri, 03 Jun 2011 23:14:27 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/607514/920050#target">Elias</a> said:</div><div class="quote"><p>
For now it should be easy enough providing the icon as a .png file and setting with al_set_display_icon though.
</p></div></div><p>

I really want to try and avoid that.</p><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/607514/920051#target">Thomas Fjellstrom</a> said:</div><div class="quote"><p>
A4 has a mechanism that let you include an &quot;allegro_icon&quot; resource that it would load and set for the window initially. We should probably do something similar.
</p></div></div><p>

Did that use the icon from the executable?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Desmond Taylor)</author>
		<pubDate>Fri, 03 Jun 2011 23:16:36 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The allegro_icon thing is the executable icon. Windows has two different icons you want to set. The first one is the executable icon that will show in Explorer. The window titlebar icon is set with al_set_display_icon.</p><p>Edit: If you don&#39;t want to include a png file you could use the memfile addon to load a png from a binary dump (into a header file).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Trent Gamblin)</author>
		<pubDate>Fri, 03 Jun 2011 23:23:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/607514/920056#target">Trent Gamblin</a> said:</div><div class="quote"><p>
If you don&#39;t want to include a png file you could use the memfile addon to load a png from a binary dump (into a header file).
</p></div></div><p>

I really have no idea where to start with that. Any chance you can give me an example?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Desmond Taylor)</author>
		<pubDate>Fri, 03 Jun 2011 23:32:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>A4 has this in the same line instead of NULL:
</p><div class="source-code snippet"><div class="inner"><pre>wnd_class.hIcon <span class="k3">=</span> LoadIcon<span class="k2">(</span>allegro_inst, <span class="s">"allegro_icon"</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Fri, 03 Jun 2011 23:35:55 +0000</pubDate>
	</item>
</rss>
