"Project style" can choose the project style, we choose the default "Visual Studio" style. The "Resource language" of this dialog box also provides the choice of language. The single-document application runtime is a single-window interface. We chose the Single document type to generate a single document application framework. The upper part of the dialog box that pops up next is written "Application Type", of course, to choose the application type, we see that there are four types: Single document (single document), Multiple documents (multiple documents), Dialog based (based on Dialog box) and Multiple top-level documents. But our example is to build a single document application, so click the "Next" button to continue setting.ģ. If you directly click the "Finish" button below, you can generate a multi-document program with the settings listed above. The first "Tabbed multiple document interface (MDI)" means that this project is a multi-document application. At this time, the "MFC Application Wizard" dialog box will pop up, with "Welcome to the MFC Application Wizard" written on the upper part, and the default settings of the current project are displayed below. Here we will not make changes and use "HelloWorld". Of course, it can be changed to other names. The Solution name is the same as Name by default. Here Name is set to "HelloWorld" and Location is set to the path of "Desktop". The meaning is as follows: Name-project name, Location-solution path, Solution name-solution name. In the lower part of the dialog box, there are three setting items: Name, Location and Solution name.
Of course we have to choose MFC Application. MFC DLL is used to generate MFC dynamic link library program. MFC Application is used to generate MFC applications. MFC ActiveX Control is used to generate MFC ActiveX control program. Because we want to generate an MFC program, select "MFC" under "Visual C ++", and three options will appear in the middle area of the dialog: MFC ActiveX Control, MFC Application, and MFC DLL. If VC ++ has been set to VC ++ at the first startup after installing VS2010, the Installed Templates-> Visual C ++ item will be expanded by default, and if VC ++ is not set, you can expand to Installed Templates-> Other Languages-> Visual C ++ item.
Click File-> New-> Project in the menu bar, the New Project dialog box pops up, and we can select the project type. Use the VS2010 application wizard to generate a single-document application framework The following steps are explained step by step:ġ. After the application wizard generates the application, VS2010 will create a directory with the name of the solution in the path set by the user and store the automatically generated files.
The view being displayed in the left panel of the figure below is the Solution Explorer, and there is a solution-HelloWorld in the view, and there is a project-HelloWorld with the same name under this solution. When creating a new project, you can choose to create a new solution or join the current solution. VS2010 provides a Solution Explorer view, which can display the contents of the current solution. A solution can manage multiple projects, and the solution can be understood as a collection of multiple related or unrelated projects.
In VS2010, the project is under solution management. These files are centrally managed through the project. Each application is handled as a project, which includes header files, source files, resource files, etc. Solution and engineering chicken pecking rice has already talked about the concept of solution and engineering in the introduction of using VS2010, here again.
#Mfc application wizard multiple top level documents how to#
This talk gives you a simple example of how to generate a single document application framework.