Differences between Win32 application and Win32 console application

Source: Internet
Author: User

Both Win32 application and Win32 console application work in a 32-bit Windows environment.

Among them, Win32 application is a common window application. Of course, some interfaces are more personalized, such as circular,

Irregular shape ...... They are all so-called guis (Graphics User Interface graphical user interface), We can click

Click to complete the control.

While Win32 console application (Win32 console application) is often like a MS-DOS window (XP called a command prompt)

Sub-appearance, we have to enter various commands on the keyboard to use it; or Cui (character User Interface character user interface ).

Differences between Win32 application and Win32 console application in vc6:

Many VC beginners may encounter the following link errors:
Linking.../subsystem: Windows
Libcd. Lib (wincrt0.obj): Error lnk2001: unresolved external symbol winmain @ 16

Debug/testwin.exe: Fatal error lnk1120: 1 unresolved externals
Error executing link.exe.

Solution: Change/subsystem: Windows in project options of project-settings-link.

/Subsystem: Console

Cause: the entry function of Win32 application is winmain.
The entry function of the Win32 console application is main.

In other words, if you write a traditional C program, you must create a Win32 console program, but the default value in VC is Win32.

Application, so the above-mentioned Link errors often occur. Differences between Win32 application and Win32 Console

It is because the link parameters in VC are different.

Someone asked how to enable the console application to automatically close its window after it runs completely.
The MS-DOS window appears only in debug mode. After compilation, the system runs the compiled file directly. When the file is closed, the window is automatically closed.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.