Hiding the console window

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?

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

Thanks a bunch!

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: drakkoon@gmail.com (Drak Koon)
To: A list for developers using the SDL library. (includes SDL-announce)
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