Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This functionality is controlled by the window manager when you use the SDL_RESIZABLE flag. To simulate the maximizing a window with SDL you would need to first determine the size the window would occupy when maximized. Then you would call <a href="http://libsdl.org/cgi/docwiki.cgi/SDL_SetVideoMode" rel="nofollow noreferrer">SDL_SetVideoMode</a> with this size after placing the window with the <a href="http://libsdl.org/cgi/docwiki.cgi/SDL_envvars" rel="nofollow noreferrer">SDL_VIDEO_WINDOW_POS environment variable</a>.</p> <p>If you truly need the window to be maximized as if you had clicked on the maximize button, then you will have to access the underlying window manager directly (i.e. SDL won't help you).</p> <p>For example, the <a href="http://msdn.microsoft.com/en-us/library/ms633548(VS.85).aspx" rel="nofollow noreferrer">ShowWindow</a> function can be used to maximize a window using the Win32 API. To get a handle to the window created by SDL use the <a href="http://www.libsdl.org/cgi/docwiki.cgi/SDL_GetWMInfo" rel="nofollow noreferrer">SDL_GetWMInfo</a> function. The resulting <a href="http://www.libsdl.org/cgi/docwiki.cgi/SDL_SysWMInfo" rel="nofollow noreferrer">SDL_SysWMinfo</a> struct contains a <em>window</em> field of type HWND. This must be passed to the ShowWindow function along with the SW_MAXIMIZE flag.</p> <pre><code>SDL_SysWMinfo info; SDL_VERSION(&amp;info.version); SDL_GetWMInfo(&amp;info); ShowWindow(info.window, SW_MAXIMIZE); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload