Programs with main()
by default are compiled as SUBSYSTEM:CONSOLE applications and get a console window. If you own the other processes your application is starting, you could modify them to be windowed applications by one of the following methods:
- Modify them to use
WinMain()
instead ofmain()
. This is the typical approach but requires modifying code. (If the reason for usingmain()
is for easy access toargc
/argv
, MSVC provides global__argc
/__argv
equivalents for windowed applications.) - Explicitly specifying the subsystem and entry point via
/SUBSYSTEM:WINDOWS /ENTRY:main
arguments tolink.exe
. - Use
editbin.exe
(from the Windows SDK) to change the subsystem type after the fact. This one might be useful if you don’t have source code access to the spawned processes.