Just contacted the set of windows, most of the concepts have not been established. I sorted out the understanding of "Win32 console program" on the Internet. Thank you.
A WIN32 console project is an application running in a 32-bit windows command prompt (so-called DOS) environment
Win32 projects refer to applications running in 32-bit windows operating system... Including Win32 console projects
1. Win32 projects include: Win32 applications, console applications, DLLs or other static library projects;
2. Console applications are usually designed without GUI and compiled into independent executable files. Console applications usually run from the command line, exchanging input and output information between command prompts and running applications.
Win32 applications have windows (or not) and windows message loop mechanism The Win32 console application is just a program running under the console, similar to the previous DOS program.
You can build a Win32 Application and a WIN32 console application in VC. Compare the two DSP project files, and you will find the subsystem in the application program: windows, and the subsystem in the console program: console Subsystem this link option tells windows how to run the executable If subsystem is console, windows will generate a console window before entering the executable code If the subsystem is windows, the operating system will not generate the console window. The application window is created by the user himself.
You can call the API in the GUI,
If you read some VC startup code (that is, the code before main, WinMain, DllMain), you will know
The console program gets more standard input and output handles in the startup code and converts program parameters into C language format
Parameter form of
The console program is input and output through the command line
Win32 program is its upper level concept. Win32 program can be console or GUI
Win32 program: programs made by using Windows compiler and connector are all so-called Win32 programs.
Console program: it is also a WIN32 program. It is a DOS like program. It can call C runtime function and Win32 API function without GUI. The console window will be its standard I / O device (CIN, cout).
DOS program: program developed in DOS environment in the past. It also takes main() as the function entry point. It can call the C runtime function, but it does not have the ability to call the win32API function.
Two applications supported by windows:
(1) GUI based applications;
(2) application program based on console user interface, namely Cui
A Windows application must have a call entry point function that runs when the application starts: Application type entry point
GUI application WinMain requiring ANSI characters and strings
Cui application requiring ANSI characters and strings main
GUI application wwinmain requiring Unicode characters and strings
Cui application wmain requiring Unicode characters and strings
The front is DOS environment, single task
After that, windows supports multitasking and multithreading~
The Win32 console program is used to write DOS program. It is rather troublesome to write windows window under DOS. Use the drawing function of C language under DOS to draw the window But VC has provided the frame and display of windows, so we don't need to do these works now Program entry can't decide anything. It's just an entry. A program must have it. What function a program performs is determined by its code The window is a figure drawn by the program, and the code is encapsulated in the bottom layer of MFC. We don't need a specific understanding, we just need to know the principle.
Source address: http://hi.baidu.com/% D6% d0% B9% FA% C9% BD% B6% AB% C8% cb2009 / blog / item / 0ebc38d758afa126960a160e.html
Contact: Manager Xu
Phone: 13907330718
Tel: 0731-22222718
Email: hniatcom@163.com
Add: Room 603, 6th Floor, Shifting Room, No. 2, Orbit Zhigu, No. 79 Liancheng Road, Shifeng District, Zhuzhou City, Hunan Province