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
-
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.
-
Click the Linker folder.
-
Click the System property page.
-
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 ???>>>