The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Hiding the console window
Armond Sarkisian
Guest

I am using VS 2005 with MS Windows XP and when i execute my SDL code, the
console window pops up behind the main app. Is there any way you can hide this
console window?

The issue comes where the user tries to exit the application by closing the
console window rather than the app window and when that happens the application
ends ungracefully (clean-up code does not get executed)..

Anyone have this issue?
Hiding the console window
Drak Koon
Guest

In your project properties under the "Linker/System" tab, change the
SubSystem from Console to Windows and it should not appear anymore.

On Tue, Aug 5, 2008 at 12:56 PM, Armond Sarkisian <
armond.sarkisian at gmail.com> wrote:

Quote:
I am using VS 2005 with MS Windows XP and when i execute my SDL code, the
console window pops up behind the main app. Is there any way you can hide
this
console window?

The issue comes where the user tries to exit the application by closing the
console window rather than the app window and when that happens the
application
ends ungracefully (clean-up code does not get executed)..

Anyone have this issue?

_______________________________________________
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20080805/2b667a67/attachment.htm>
Hiding the console window
Armond Sarkisian
Guest

Thanks a bunch!
Hiding the console window
Edward Byard
Guest

Brilliant - I've been trying to do this for ages!

Although, you may get a linker error for a missing "WinMain"

If so, do this:

Replace:
int _tmain(int argc, _TCHAR* argv[])

With

int WINAPI WinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
}

and include <windows.h>
Ed



----- Original Message ----
From: Drak Koon <drakkoon at gmail.com>
To: A list for developers using the SDL library. (includes SDL-announce) <sdl at lists.libsdl.org>
Sent: Tuesday, 5 August, 2008 6:01:52 PM
Subject: Re: [SDL] Hiding the console window


In your project properties under the "Linker/System" tab, change the SubSystem from Console to Windows and it should not appear anymore.


On Tue, Aug 5, 2008 at 12:56 PM, Armond Sarkisian <armond.sarkisian at gmail.com> wrote:

I am using VS 2005 with MS Windows XP and when i execute my SDL code, the
console window pops up behind the main app. Is there any way you can hide this
console window?

The issue comes where the user tries to exit the application by closing the
console window rather than the app window and when that happens the application
ends ungracefully (clean-up code does not get executed)..

Anyone have this issue?

_______________________________________________
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


__________________________________________________________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20080805/820d9ee6/attachment.htm>