Поделиться через


Visual C++ Project Types

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Visual C++ Project Types.

You can use a project template to create the basic program structure, menus, toolbars, icons, references, and #include statements that are appropriate for the kind of project you want to create. Visual Studio includes several kinds of Visual C++ project templates and provides wizards for many of them so that you can customize your projects as you create them. Immediately after you create a project, you can build it and run the application—it's good practice to build intermittently as you develop your application.

You don't have to use a template to create a project, but in most cases it's more efficient to do so because it's easier to modify the provided project files and structure than it is to create them from scratch.

Note

You can create a C-language project by using C++ project templates. In the generated project, locate files that have a .cpp file name extension and change it to .c. Then, on the Project Properties page for the project (not for the solution), expand Configuration Properties, C/C++ and select Advanced. Change the Compile As setting to Compile as C Code (/TC).

Project Templates

Visual Studio the following Visual C++ project templates.

Store Apps

C#, VB, and C++ project templates for Store apps

ATL

Project template How to create a project
ATL Project Creating an ATL Project

CLR

Project template
(NOTINBUILD)Class Library Template (C++)
How to: Create CLR Console Applications (C++/CLI)
NOTINBUILD CLR Empty Project Template (C++)

General

Project template How to create a project
Empty Project Creating Solutions and Projects
Custom Wizard Creating a Custom Wizard
Makefile Project Creating a Makefile Project

MFC

Project template How to create a project
MFC ActiveX Control Creating an MFC ActiveX Control
MFC Application Creating an MFC Application
MFC DLL Creating an MFC DLL Project

Test

Project template How to create a project
Managed Test Project Create a unit test project
Native Unit Test Project Unit testing native code with Test Explorer

Win32

Project template How to create a project
Win32 Console Project Creating a Console Application
Win32 Project How to: Create a Windows Desktop Application

TODO Comments

Many of the files generated by a project template contain TODO comments to help you identify where you can provide your own source code. For more information about how to add code, see Adding Functionality with Code Wizards and Working with Resource Files.

See Also

Creating Desktop Projects By Using Application Wizards
Using Projects to Create Applications
CLR Projects