Everyone knows that when writing a Win32 Console Application, when you run this program, you will have a Console window similar to the DOS window by default, but sometimes we just want to run a function code in the program, do not want to display This console window, let the code are automatically exited after the code is executed. Here, you will introduce how to hide the console window of Win32 console application because this method is implemented by setting up the compiler's link switch, so let's take a look at the compiler. link switch option (ie, linker options) first we look at the linker / subsystem options grammatical form of the option are as follows: / SUBSYSTEM:. {CONSOLE | EFI_APPLICATION | EFI_BOOT_SERVICE_DRIVER | EFI_ROM | EFI_RUNTIME_DRIVER | NATIVE | POSIX | WINDOWS | WINDOWSCE} [ This link option tells the operating system how to run the executable Console: Win32 character mode application, this type of application will generate a console window similar to the DOS window when running, if applied The main function of the program is Main () or wmain (), which is a console application EXTENSIBLE FIRMWARE INTERFACE and CPU specific architecture related to a parameter option, is not common, here is not described in detail here. If you are interested, you can access the Intel Home page to view the relevant content native; device driver option, if / driver: WDM option is set, this link option (native) is the default option POSIX: run in Windows NT in POSIX Application Windows: This type of application does not produce a Console window, which is created by the user yourself, in short, is a standard Win32 Application, its entry address is a WinMain () function or Wwinmain () function The address if you define the main function defined by the application is Winmain or Wwinmain, by default, the application is a Win32 Application! Windowsce: Applications on Windows CE Major and Minor (optional): Main version number and sub version number, this option is Optional, this option is from 0 to 65535. From above, if we create a Win32 Console Application, Linker's / subsystem option should be console, you can develop the environment in the VC development environment. "> Setting-> link -> Project Option! Next, let's take a look at how the app is running! We know the program written by VC, it is necessary to run the C / C runtime, when we run a C / C program When the linker will first look for the startup function of the application, for example, if you have established a console program, the compiler has the link switch will be the following form / subsystem: "console" / entry: "maincrtstartup" (ANSI) / subsystem: "wmaincrtstartuup" (unicode) If you have established a Win32 Application, the compiler has a link switch will be a form / subsystem: "windows" / entry: "WinMain" / SBusystem : "Windows" / entry: "wwwmain" (uincode) The above in the two forms can be project-> setting-> link-> Project Option does not need to be set, if you only set it / Subsystem: "console"