Windows programs must have the winmain function, because the most important task of this function is to create the main window of the application. The biggest difference between a Windows program and a MS-DOS-based program is that a MS-DOS program gets user input by calling the features of the operating system, windows programs process user input through messages sent by the operating system. Windows messages are strictly defined and apply to all programs.
Windows provides a common graphical device interface (GUI). We call the (GDI) function to deal with hardware and ignore the device environment, windows automatically maps the device environment structure to the corresponding physical device.
The data required in Windows programming is stored in resource files. In this way, the connector can combine compiled binary code with binary resource files to generate executable programs. Resource files can include bitmaps, icons, menu definitions, and dialog box designs, or even user-defined formats.
Windows programs allow dynamic connection to the target module, and multiple applications can share the same dynamic Connection Library.
The source program browser of VC ++ enables us to understand or edit programs from the perspective of classes or functions, rather than directly starting with files. If you are proficient in using the source code browser, you will get twice the result with half the effort. The source program browser mainly displays the following statuses:
Definitions and references -- select any function, variable, type, macro definition to see its definition in the project and where it is used.
Call Graph/caller graph-shows the call and called functions of the selected function.
Derived class graph/base class graph -- graphic representation of class hierarchies. You can see the derived classes and base classes and members of the selected class.
File outline: lists the classes, functions, and data members of the selected files, and displays the positions and locations they define.
It can be seen that source Brower has much more functions than Class View and is more useful.
To learn about loose_went in this chapter, we recommend that you use Appwizard in VC ++ 6 to generate an empty program, and then try to see which files are available, and their class levels, functions, macros, and structures are defined in this way, and learning programming is not feasible.