Hiding the DOS Console

Hello everybody,

I’ developing a game with SDL in VC++ .NET. I created the project as a Win32
Console Application. SDL doesn’t run in Fullscreen mode, so it would be nice
if the Dos Box under Windows won’t appear.
Can somebody tell me, how I can close it? (or just minimize)

Thanks in advance

Hello everybody,

I’ developing a game with SDL in VC++ .NET. I created the project as a Win32
Console Application. SDL doesn’t run in Fullscreen mode, so it would be nice
if the Dos Box under Windows won’t appear.
Can somebody tell me, how I can close it? (or just minimize)

Some time ago I’ve also had this problem, AFAIR I solved it just by changing Application type to Win32 Windows Application (or sth like that), so that console won’t be showing up. Of course, if you do sth with console (ie. error logging) this isn’t for you and sadly, I don’t know any other solutions…

HTH

Koshmaar

Koshmaar wrote:

Hello everybody,

I’ developing a game with SDL in VC++ .NET. I created the project as a Win32
Console Application. SDL doesn’t run in Fullscreen mode, so it would be nice
if the Dos Box under Windows won’t appear.
Can somebody tell me, how I can close it? (or just minimize)

Some time ago I’ve also had this problem, AFAIR I solved it just by changing Application type to Win32 Windows Application (or sth like that), so that console won’t be showing up. Of course, if you do sth with console (ie. error logging) this isn’t for you and sadly, I don’t know any other solutions…

HTH

Koshmaar


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

That is the correct solution, and the output from stderr and stdout
appear in text files (stdout.txt and stderr.txt) while the game is
running. Every time you run the game they are recreated. If they are
empty when the game exits, they are deleted.

-TomT64

Daniel wrote:

Hello everybody,

I’ developing a game with SDL in VC++ .NET. I created the project as a Win32
Console Application. SDL doesn’t run in Fullscreen mode, so it would be nice
if the Dos Box under Windows won’t appear.
Can somebody tell me, how I can close it? (or just minimize)

Daniel,
Check the documentation on the Win32 function FreeConsole(). I believe
it will do what you’re looking for, although in the long run, writing
the program as a Windows application would be a better solution.

Matt

I’ developing a game with SDL in VC++ .NET. I created the project as a
Win32
Console Application. SDL doesn’t run in Fullscreen mode, so it would be
nice
if the Dos Box under Windows won’t appear.
Can somebody tell me, how I can close it? (or just minimize)

dissappear:
If you have Microsoft Visual Studio do this:

  1. your main method:
    int main(int argc, char **argv) {…}

  2. in Project properties in Linker Section:
    Subsystem Windows (/SUBSYSTEM:WINDOWS)

e.g. my command line parameters for Linker:
/OUT:“.\Debug/main.exe” /INCREMENTAL:NO /NOLOGO /DEBUG
/PDB:“.\Debug/main.pdb” /SUBSYSTEM:WINDOWS /MACHINE:X86 libjpeg.lib
opengl32.lib glu32.lib sdl.lib kernel32.lib user32.lib gdi32.lib
winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
uuid.lib odbc32.lib odbccp32.lib

If you have any problems, change “Entry Point” of Linker options to
“msvCRTstartup” (or something similar :wink: try find word in google )

Maybe you must include msvcrt.lib in your project, but I am not sure.

Maybe you must implement (oh god! maybe!) msvCRTstartup like this:

void msvCRTstartup(void) { main(0, 0); }

Sorry for the mess but I have lot of time to work with C++/SDL/OpenGL and I
left my project incomplete with many compile errors. So I cannot try and
tell you!
Now I work with shity Java in many shity projects!..

i have the same problem ,who knows?
thanks very much!> Hello everybody,

I’ developing a game with SDL in VC++ .NET. I created the project as a Win32
Console Application. SDL doesn’t run in Fullscreen mode, so it would be nice
if the Dos Box under Windows won’t appear.
Can somebody tell me, how I can close it? (or just minimize)

Thanks in advance


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

The problem is that you created the application as a CONSOLE application…
Since it’s a console app, it requires a console window (what you’ve called a
Dos Box)…
If you don’t want this window to appear, you have to create it as a WINDOWS
application. To do so, just pass /SUBSYSTEM:WINDOWS to the linker.

Here’s some more info:
/SUBSYSTEM:{CONSOLE|EFI_APPLICATION|EFI_BOOT_SERVICE_DRIVER|

        EFI_ROM|EFI_RUNTIME_DRIVER|NATIVE|POSIX|WINDOWS|WINDOWSCE}

        [,major[.minor]]

where:

CONSOLE

Win32 character-mode application. Console applications are given a console
by the operating system. If main or wmain is defined, CONSOLE is the
default.

Extensible Firmware Interface

The EFI_* subsystems. See the EFI specification for more information. For
example, see the Intel web site. The minimum version and default version is
1.0.

NATIVE

Device drivers for Windows NT. If /DRIVER:WDM
<ms-help://MS.VSCC.2003/MS.MSDNQTR.2003APR.1033/vccore/html/core.2f.driver
.htm> is specified, NATIVE is the default.

POSIX

Application that runs with the POSIX subsystem in Windows NT.

WINDOWS

Application does not require a console, probably because it creates its own
windows for interaction with the user. If WinMain or wWinMain is defined,
WINDOWS is the default.

WINDOWSCE

Application that runs on a Windows CE device.

major and minor (optional)

Specify the minimum required version of the subsystem. The arguments are
decimal numbers in the range 0 through 65,535. See the Remarks for details.
There are no upper bounds for version numbers.

Remarks

The /SUBSYSTEM option tells the operating system how to run the .exe file.

The choice of subsystem affects the default starting address for the
program. For more information, see the Entry-Point
<ms-help://MS.VSCC.2003/MS.MSDNQTR.2003APR.1033/vccore/html/core.2f.entry.
htm> Symbol (/ENTRY:function) option.

The optional minimum and default major and minor version numbers for the
subsystems are as follows.

Subsystem Minimum Default
CONSOLE 3.10 (x86)
5.01 (Itanium) 4.00 (x86)
5.01 (Itanium)
WINDOWS 3.10 (x86)
5.01 (Itanium) 4.00 (x86)
5.01 (Itanium)
NATIVE (with DRIVER:WDM) 1.00 (x86)
1.10 (Itanium) 1.00 (x86)
1.10 (Itanium)
NATIVE (without /DRIVER:WDM) 3.10 (x86)
5.01 (Itanium) 4.00 (x86)
5.01 (Itanium)
POSIX 1.0 19.90
WINDOWSCE 1.0 2.0

To set this linker option in the Visual Studio development environment

  1. Open the project’s Property Pages dialog box. For details, see
    Setting
    <ms-help://MS.VSCC.2003/MS.MSDNQTR.2003APR.1033/vccore/html/_asug_specifying
    _project_configuration_settings.htm> Visual C++ Project Properties.

  2. Click the Linker folder.

  3. Click the System property page.

  4. Modify the SubSystem property.

To set this linker option programmatically

See <?XML:NAMESPACE PREFIX = MSHelp NS = “Microsoft Learn: Build skills that open doors in your career
/>SubSystem Property.

See Also

Setting
<ms-help://MS.VSCC.2003/MS.MSDNQTR.2003APR.1033/vccore/html/_core_set_linker
_options.htm> Linker Options | Linker
<ms-help://MS.VSCC.2003/MS.MSDNQTR.2003APR.1033/vccore/html/_core_linker_ref
erence.htm> Options> ----- Original Message -----

From: sdl-bounces+kos=climaxgroup.com@libsdl.org
[mailto:sdl-bounces+kos=climaxgroup.com at libsdl.org]On Behalf Of gaobird
Sent: 23 December 2004 05:49
To: a list for developers using the sdl library. (includes sdl-announce)
Subject: Re: [SDL] Hiding the DOS Console

i have the same problem ,who knows?
thanks very much!

Hello everybody,

I’ developing a game with SDL in VC++ .NET. I created the project as a
Win32
Console Application. SDL doesn’t run in Fullscreen mode, so it would be
nice
if the Dos Box under Windows won’t appear.
Can somebody tell me, how I can close it? (or just minimize)

Thanks in advance


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

??? http://ff.163.com/pop/ff/
? http://www.126.com 1.5G???126???
http://www.126.com ???>>>