What is the difference between a win32 application, a windowing application, and a console application?

I want to know what is the difference between a windows form application, win32application ana console, I know that a window-creating application and a win32 application are a gui tool, but I want to know when to use one over the other, and whether it is possible to convert a console application to windows form application?

+6
source share
3 answers

The Windows form is a .NET application. It is not based directly on the native Windows API, but instead on the .NET framework. Which includes a virtual machine.

Win32 usually refers to the 32-bit Windows API. However, the _WIN32 macro _WIN32 defined for both 32-bit and 64-bit programming. As a type of Visual Studio project, it includes both GUI-level API programs and the console subsystem.

A Windows subsystem is a small integer value in the executable header that tells Windows what services this program requires. This value can be checked, for example, Microsoft dumpbin , for example. dumpbin c:\windows\notepad.exe /headers | find "ubs" dumpbin c:\windows\notepad.exe /headers | find "ubs" . On Windows 9x, dumpbin output was available through the file preview function, but this function was discontinued.

Each process in Windows can be associated with one and no more than one console window.

The GUI subsystem means that Windows will NOT attempt to merge each instance with its corresponding console window. However, the process can create a console window. Typically, this subsystem is used for ordinary programs with a graphical user interface (hence, the "GUI") and with most of the linkers that it indicated as "windows."

The console subsystem means that Windows will try to combine each instance with the corresponding console window, creating a new one if necessary.

note that

  • The same source code can be created as a console or graphical subsystem. And it is very easy to do. Just change the specification of the subsystem.

  • The GUI subsystem executable file has standard streams, as well as the console subsystem executable file.

  • The executable console subsystem can represent a graphical user interface, just like a graphical interface.

Also note that

  • Microsoft tools by default will not accept the standard C ++ main for building the GUI subsystem. However, this inappropriate behavior is easy to fix. Just specify /entry:mainCRTStartup in the linker options.

There is no such problem with GNU tools, i.e. g ++.

+10
source
  • window - making applications are applications that use GUI programming interfaces such as .NET, DELPHI, or MFC, instead of directly calling the win32 API.
  • On the other hand, a win32 application usually deals directly with api windows for building applications from the bottom up.
  • And console applications do not have a graphical interface. To enter data and output the result, only the command line window is used.
+4
source

The Windows Form Application is the .NET GUI.

The "win32 application" is the native graphical interface of Windows.

"console application" is a native application without a GUI.

I really do not understand what exactly you mean by "converting" one type of application to another. But. If you are talking about using some IDE and converting a project to another: YES it is possible. What is the main difference is the .LLL with which you linked your application. You can set up a project open as a “console” to behave like “win32,” for example. It is not very simple, but it is possible. Nos, if you want to know if an existing existing application can be converted: NO.

+3
source

All Articles