<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Maximizing the display in code?</title>
		<link>http://www.allegro.cc/forums/view/610083</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sun, 22 Apr 2012 08:23:44 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I have run into a small issue. When the user goes from full screen back to windowed or starts the game, I want to set it back to how they had it previously. I can set the window position, and size, but I see no way to change it to a maximized state. The best I can do is set it to a comfortable window size. Is there a way to do this in code or plans to add this in the future?</p><p>Thanks
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (jmasterx)</author>
		<pubDate>Sun, 22 Apr 2012 00:59:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m all for a way to do this. I can probably implement it for X11. My favorite API would be <span class="source-code">al_set_display_flag<span class="k2">(</span>display, ALLEGRO_MAXIMIZED, <span class="k1">true</span><span class="k3">/</span><span class="k1">false</span><span class="k2">)</span></span> to maximize/un-maximize the window and <span class="source-code"><span class="k2">(</span><a href="http://www.allegro.cc/manual/al_get_display_flags"><span class="a">al_get_display_flags</span></a><span class="k2">(</span>display<span class="k2">)</span> <span class="k3">&amp;</span> ALLEGRO_MAXIMIZED<span class="k2">)</span></span> to check whether it is currently maximized.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Sun, 22 Apr 2012 03:51:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>On Windows:
</p><div class="source-code snippet"><div class="inner"><pre>SendMessage<span class="k2">(</span>hwnd, WM_SYSCOMMAND, SC_MAXIMIZE, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
SendMessage<span class="k2">(</span>hwnd, WM_SYSCOMMAND, SC_RESTORE, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

for isMaximized:<br />You can use the USER API GetWindowPlacement to obtain the current status of<br />a given window -- the showCmd field of the returned WINDOWPLACEMENT structure<br />should be equal to SW_MAXIMIZE (3) if the window is maximized.</p><p>It could also be added as a new display flag since it looks cleaner if the window is first shown with the correct state.</p><p>On OSX the concept does not seem to exist, best is the zoom button thing:<br /> <a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/Reference/Reference.html">https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/Reference/Reference.html</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (jmasterx)</author>
		<pubDate>Sun, 22 Apr 2012 04:00:23 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Is the zooming thing the same as the new fullscreening ability in Lion? Where windows that support it have a fullscreen button on the right side of the title bar? When you use that the menubar autohides at the top.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Trent Gamblin)</author>
		<pubDate>Sun, 22 Apr 2012 08:23:44 +0000</pubDate>
	</item>
</rss>
