Skip to content

Commit b1bdd87

Browse files
authored
Merge pull request MicrosoftDocs#2259 from mikeblome/mb-atl-wiz
updated mfc app topics for version differences
2 parents 8093e62 + 4b198a1 commit b1bdd87

12 files changed

+126
-55
lines changed

docs/atl/creating-the-project-atl-tutorial-part-1.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ ms.assetid: f6b727d1-390a-4b27-b82f-daadcd9fc059
66
---
77
# Creating the Project (ATL Tutorial, Part 1)
88

9-
This tutorial walks you step-by-step through a nonattributed ATL project that creates an ActiveX object that displays a polygon. The object includes options for allowing the user to change the number of sides making up the polygon, and code to refresh the display.
10-
11-
> [!NOTE]
12-
> ATL and MFC are not generally supported in the Express editions of Visual Studio.
9+
This tutorial walks you step-by-step through a non-attributed ATL project that creates an ActiveX object that displays a polygon. The object includes options for allowing the user to change the number of sides making up the polygon, and code to refresh the display.
1310

1411
> [!NOTE]
1512
> This tutorial creates the same source code as the Polygon sample. If you want to avoid entering the source code manually, you can download it from the [Polygon sample abstract](https://github.com/Microsoft/VCSamples/tree/master/VC2008Samples/ATL/Controls/Polygon). You can then refer to the Polygon source code as you work through the tutorial, or use it to check for errors in your own project.

docs/ide/walkthrough-working-with-projects-and-solutions-cpp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ To create a project, first choose a project-type template. For each project type
2626

2727
1. From the main menu, choose **File** > **New** > **Project** to open the **Create a New Project** dialog box.
2828

29-
1. At the top of the dialog, set **Language** to **C++**, set **Platform** to **Windows**, and set **Project type** to **Console**.
29+
1. At the top of the dialog, set **Language** to **C++**, set **Platform** to **Windows**, and set **Project type** to **Console**.
3030

3131
1. From the filtered list of project types, choose **Console App** then choose **Next**. In the next page, enter *Game* as the name for the project.
3232

@@ -248,7 +248,7 @@ Next, build the project and run the app.
248248
249249
Congratulations, you've successfully built an app project and solution. Continue the walkthrough to learn more about how to build C++ code projects in Visual Studio.
250250
251-
## Next Steps
251+
## Next steps
252252
253253
**Previous:** [Using the Visual Studio IDE for C++ Desktop Development](../ide/using-the-visual-studio-ide-for-cpp-desktop-development.md)<br/>
254254
**Next:** [Walkthrough: Building a Project (C++)](../ide/walkthrough-building-a-project-cpp.md)

docs/mfc/reference/adding-atl-support-to-your-mfc-project.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,32 @@ ms.assetid: b5fe15d6-7752-4818-b9f9-62482ad35c95
77
---
88
# Adding ATL Support to Your MFC Project
99

10-
If you have already created an MFC-based application, then you can add support for the Active Template Library (ATL) easily by running the Add ATL Support to MFC Project Wizard.
11-
12-
> [!NOTE]
13-
> ATL and MFC are not generally supported in the Express editions of Visual Studio.
10+
If you have already created an MFC-based application, then you can add support for the Active Template Library (ATL) easily by using the IDE.
1411

1512
> [!NOTE]
1613
> This support applies only to simple COM objects added to an MFC executable or DLL project. You can add other COM objects (including ActiveX controls) to MFC projects, but the objects might not operate as expected.
1714
15+
::: moniker range=">=vs-2019"
16+
17+
1. In Solution Explorer, right-click the project node.
18+
19+
1. On the shortcut menu, click **Add**, and then click **New Item**.
20+
21+
1. Choose **ATL** in the left pane, then choose **ATL Support** in the center pane.
22+
23+
::: moniker-end
24+
25+
::: moniker range="<=vs-2017"
26+
1827
### To add ATL support to your MFC project
1928

20-
1. In Solution Explorer, right-click the project to which you want to add ATL support.
29+
1. In Solution Explorer, right-click the project node.
2130

2231
1. On the shortcut menu, click **Add**, and then click **Add Class**.
2332

24-
1. Select the **Add ATL Support to MFC Project** icon.
25-
26-
> [!NOTE]
27-
> This icon is located in the ATL folder in the **Categories** pane.
33+
1. Select **ATL** in the left pane, then choose **Add ATL Support to MFC Project** in the center pane.
2834

29-
1. When prompted, click **Yes** to add ATL support.
35+
::: moniker-end
3036

3137
For more information about how adding ATL support changes your MFC project's code, see [Details of ATL Support Added by the ATL Wizard](../../mfc/reference/details-of-atl-support-added-by-the-atl-wizard.md)
3238

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Creating a Forms-Based MFC Application"
3-
ms.date: "11/04/2016"
3+
ms.date: "08/19/2019"
44
f1_keywords: ["vc.appwiz.mfcforms.project"]
55
helpviewer_keywords: ["applications [MFC], forms-based", "forms-based applications [MFC]"]
66
ms.assetid: 048d2f7d-b60d-4386-ad8e-71d49af9c05e
@@ -19,38 +19,38 @@ SDI, MDI, and multiple top-level document applications are all forms based and u
1919

2020
Any dialog-based application, by definition, is forms based. A dialog-based application does not use the document/view architecture, so you must manage the creation and access methods for your own additional forms.
2121

22-
The base class for form-based applications is [CFormView](../../mfc/reference/cformview-class.md). If your application has database support, then you can also select any class that derives from `CFormView`. A form is any window derived from `CFormView` or from any class that inherits from `CFormView`.
22+
The base class for form-based applications is [CFormView](cformview-class.md). If your application has database support, then you can also select any class that derives from `CFormView`. A form is any window derived from `CFormView` or from any class that inherits from `CFormView`.
2323

24-
Even if you use a base class such as [CView](../../mfc/reference/cview-class.md), you can later make your applications forms-based by [adding an MFC class](../../mfc/reference/adding-an-mfc-class.md) derived from `CFormView` and checking the **Generate DocTemplate resources** checkbox in the [MFC Class Wizard](../../mfc/reference/document-template-strings-mfc-add-class-wizard.md).
24+
Even if you use a base class such as [CView](cview-class.md), you can later make your applications forms-based by [adding an MFC class](adding-an-mfc-class.md) derived from `CFormView` and checking the **Generate DocTemplate resources** checkbox in the [MFC Class Wizard](document-template-strings-mfc-add-class-wizard.md).
2525

2626
Once you finish with the wizard, your project opens, and if you selected `CFormView` (or a class that inherits from `CFormView`) as your base class or if you created a dialog-based application, Visual C++ opens the dialog editor. At this point, you are ready to design your first form.
2727

2828
### To begin creating a forms-based MFC executable
2929

30-
1. Follow the directions in [Creating an MFC Application](../../mfc/reference/creating-an-mfc-application.md).
30+
1. Follow the directions in [Creating an MFC Application](creating-an-mfc-application.md) for a forms-based MFC application.
3131

32-
1. In the MFC Application Wizard [Application Type](../../mfc/reference/application-type-mfc-application-wizard.md) page, select the **Document/view architecture support** check box.
32+
1. In the MFC Application Wizard [Application Type](application-type-mfc-application-wizard.md) page, select the **Document/view architecture support** check box.
3333

3434
1. Select **Single document**, **Multiple documents**, or **Multiple top-level documents**.
3535

3636
> [!NOTE]
37-
> If you chose a SDI, MDI, or multiple top-level document interface application, by default, `CView` is set as the base class for your application's view in the [Generated Classes](../../mfc/reference/generated-classes-mfc-application-wizard.md) page of the wizard. To create a forms-based application, you must select `CFormView` as the base class for the application's view. Note that the wizard provides no printing support for a forms-based application.
37+
> If you chose a SDI, MDI, or multiple top-level document interface application, by default, `CView` is set as the base class for your application's view in the [Generated Classes](generated-classes-mfc-application-wizard.md) page of the wizard. To create a forms-based application, you must select `CFormView` as the base class for the application's view. Note that the wizard provides no printing support for a forms-based application.
3838
3939
1. Set any other project options you want on the other pages of the wizard.
4040

4141
1. Click **Finish** to generate the skeleton application.
4242

4343
For more information, see:
4444

45-
- [Derived View Classes](../../mfc/derived-view-classes-available-in-mfc.md)
45+
- [Derived View Classes](../derived-view-classes-available-in-mfc.md)
4646

47-
- [Alternatives to the Document/View Architecture](../../mfc/alternatives-to-the-document-view-architecture.md)
47+
- [Alternatives to the Document/View Architecture](../alternatives-to-the-document-view-architecture.md)
4848

49-
- [Application Design Choices](../../mfc/application-design-choices.md)
49+
- [Application Design Choices](../application-design-choices.md)
5050

5151
## See also
5252

53-
[MFC Application Wizard](../../mfc/reference/mfc-application-wizard.md)<br/>
54-
[Form Views](../../mfc/form-views-mfc.md)<br/>
55-
[Creating a File Explorer-Style MFC Application](../../mfc/reference/creating-a-file-explorer-style-mfc-application.md)<br/>
56-
[Creating a Web Browser-Style MFC Application](../../mfc/reference/creating-a-web-browser-style-mfc-application.md)
53+
[MFC Application Wizard](mfc-application-wizard.md)<br/>
54+
[Form Views](../form-views-mfc.md)<br/>
55+
[Creating a File Explorer-Style MFC Application](creating-a-file-explorer-style-mfc-application.md)<br/>
56+
[Creating a Web Browser-Style MFC Application](creating-a-web-browser-style-mfc-application.md)

docs/mfc/reference/creating-an-mfc-activex-control.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Creating an MFC ActiveX Control"
3-
ms.date: "09/12/2018"
3+
ms.date: "08/19/2019"
44
f1_keywords: ["vc.appwiz.activex.project"]
55
helpviewer_keywords: ["MFC ActiveX controls [MFC], creating", "ActiveX controls [MFC], creating"]
66
ms.assetid: 8bd5a93c-d04d-414e-bb28-163fdc1c0dd5
@@ -16,9 +16,7 @@ The easiest way to create an MFC ActiveX control is to use the [MFC ActiveX Cont
1616

1717
### To create an MFC ActiveX Control using the MFC ActiveX Control Wizard
1818

19-
1. Follow the instructions in the help topic [Create a C++ console app project](../../get-started/tutorial-console-cpp.md).
20-
21-
1. In the **New Project** dialog box, select the **MFC ActiveX Control** icon in the Templates pane to open the MFC ActiveX Control Wizard.
19+
1. Follow the instructions in the help topic [Creating an MFC Application](creating-an-mfc-application.md) but choose **MFC ActiveX Control** from the list of available templates.
2220

2321
1. Define your [application settings](../../mfc/reference/application-settings-mfc-activex-control-wizard.md), [control names](../../mfc/reference/control-names-mfc-activex-control-wizard.md), and [control settings](../../mfc/reference/control-settings-mfc-activex-control-wizard.md) using the MFC ActiveX Control Wizard.
2422

Lines changed: 78 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
---
22
title: "Creating an MFC Application"
3-
ms.date: "07/28/2019"
3+
ms.date: "08/28/2019"
44
helpviewer_keywords: ["applications [MFC]", "MFC, creating applications", "MFC applications"]
55
ms.assetid: b8b8aa08-9c49-404c-8078-b42079ac18f0
66
---
77
# Creating an MFC Application
88

9-
An MFC application is an executable application for Windows that is based on the Microsoft Foundation Class (MFC) Library. The easiest way to create an MFC application is to use the MFC Application Wizard (**MFC App project** in Visual Studio 2019). To create an MFC console application, use the Windows Desktop Wizard and choose the **Console Application** and **MFC Headers** options.
10-
11-
> [!IMPORTANT]
12-
> MFC projects are not supported in Visual Studio Express editions.
13-
14-
MFC executables generally fall into five types: standard Windows applications, dialog boxes, forms-based applications, Explorer-style applications, and Web browser-style applications. For more information, see:
9+
An MFC application is an executable application for Windows that is based on the Microsoft Foundation Class (MFC) Library. MFC executables generally fall into five types: standard Windows applications, dialog boxes, forms-based applications, Explorer-style applications, and Web browser-style applications. For more information, see:
1510

1611
- [Using the Classes to Write Windows Applications](../../mfc/using-the-classes-to-write-applications-for-windows.md)
1712

@@ -25,23 +20,90 @@ MFC executables generally fall into five types: standard Windows applications, d
2520

2621
The MFC Application Wizard generates the appropriate classes and files for any of these types of applications, depending on the options you select in the wizard.
2722

28-
### To create an MFC application using the MFC Application Wizard
2923

30-
1. Follow the instructions in the help topic [Create a C++ console app project](../../get-started/tutorial-console-cpp.md).
24+
The easiest way to create an MFC application is to use the MFC Application Wizard (**MFC App project** in Visual Studio 2019). To create an MFC console application (a command-line program that uses MFC libraries but runs in the console window), use the Windows Desktop Wizard and choose the **Console Application** and **MFC Headers** options.
25+
26+
::: moniker range=">=vs-2019"
27+
28+
## To create an MFC forms or dialog-based application
29+
30+
1. From the main menu, choose **File** > **New** > **Project**.
31+
1. Enter "MFC" into the search box and then choose **MFC App** from the result list.
32+
1. Modify the defaults as needed, then press **Create** to open the **MFC Application Wizard**.
33+
1. Modify the configuration values as needed, then press **Finish**.
34+
35+
For more information, see [Creating a Forms-Based MFC Application](creating-a-forms-based-mfc-application.md).
36+
37+
![MFC Application Wizard](media/mfc-app-wizard.png)
38+
39+
## To create an MFC console application
40+
41+
An MFC console application is a command-line program that uses MFC libraries but runs in the console window.
42+
43+
1. From the main menu, choose **File** > **New** > **Project**.
44+
1. Enter "Desktop" into the search box and then choose **Windows Desktop Wizard** from the result list.
45+
1. Modify the project name as needed, then press **Next** to open the **Windows Desktop Wizard**.
46+
1. Check the **MFC Headers** box and set other values as needed, then press **Finish**.
47+
48+
![MFC Application Wizard](media/windows-desktop-wizard.png)
49+
50+
::: moniker-end
51+
52+
::: moniker range="=vs-2017"
53+
54+
## To create an MFC forms or dialog-based application
3155

32-
1. In the **New Project** dialog box, select **MFC Application** in the Templates pane to open the wizard.
56+
1. From the main menu, choose **File** > **New** > **Project**.
57+
1. Under the **Installed** templates, choose **Visual C++** > **MFC/ATL**. If you don't see these, use the Visual Studio Installer to add them.
58+
1. Choose **MFC Application** from the center pane.
59+
1. Modify the configuration values as needed, then press **Finish**.
3360

34-
1. Define your application settings using the [MFC Application Wizard](../../mfc/reference/mfc-application-wizard.md).
61+
For more information, see [Creating a Forms-Based MFC Application](creating-a-forms-based-mfc-application.md).
3562

36-
> [!NOTE]
37-
> Skip this step to keep the wizard default settings.
63+
![MFC Application Wizard](media/mfc-app-wizard.png)
3864

39-
1. Click **Finish** to close the wizard and open your new project in the development environment.
65+
## To create an MFC console application
66+
67+
An MFC console application is a command-line program that uses MFC libraries but runs in the console window.
68+
69+
1. From the main menu, choose **File** > **New** > **Project**.
70+
1. Under the **Installed** templates, choose **Visual C++** > **Windows Desktop**.
71+
1. Choose **Windows Desktop Wizard** from the center pane.
72+
1. Modify the project name as needed, then press **OK** to open the **Windows Desktop Wizard**.
73+
1. Check the **MFC Headers** box and set other values as needed, then press **Finish**.
74+
75+
![MFC Application Wizard](media/windows-desktop-wizard-2017.png)
76+
77+
::: moniker-end
78+
79+
::: moniker range="=vs-2015"
80+
81+
## To create an MFC forms or dialog-based application
82+
83+
1. From the main menu, choose **File** > **New** > **Project**.
84+
1. Under the **Installed** templates, choose **Visual C++** > **MFC**.
85+
1. Choose **MFC Application** from the center pane.
86+
1. Click **Next** to start the **MFC Application Wizard**.
87+
88+
For more information, see [Creating a Forms-Based MFC Application](creating-a-forms-based-mfc-application.md).
89+
90+
![MFC Application Wizard](media/mfc-app-wizard-2015.png)
91+
92+
## To create an MFC console application
93+
94+
An MFC console application is a command-line program that uses MFC libraries but runs in the console window.
95+
96+
1. From the main menu, choose **File** > **New** > **Project**.
97+
1. Under the **Installed** templates, choose **Visual C++** > **Win32**.
98+
1. Choose **Win32 Console Application** from the center pane.
99+
1. Modify the project name as needed, then press **OK**.
100+
1. On the second page of the wizard, check the **Add common headers for MFC** box and set other values as needed, then press **Finish**.
101+
102+
::: moniker-end
40103

41104
Once your project is created, you can view the files created in **Solution Explorer**. For more information about the files the wizard creates for your project, see the project-generated file ReadMe.txt. For more information about the file types, see [File Types Created for Visual Studio C++ projects](../../build/reference/file-types-created-for-visual-cpp-projects.md).
42105

43106
## See also
44107

45108
[Adding Functionality with Code Wizards](../../ide/adding-functionality-with-code-wizards-cpp.md)<br/>
46-
[Property Pages](../../build/reference/property-pages-visual-cpp.md)
47-
109+
[Property Pages](../../build/reference/property-pages-visual-cpp.md)

docs/mfc/reference/creating-an-mfc-dll-project.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Creating an MFC DLL Project"
3-
ms.date: "11/04/2016"
3+
ms.date: "08/19/2019"
44
f1_keywords: ["vc.appwiz.mfcdll.project"]
55
helpviewer_keywords: ["MFC DLLs [MFC], creating projects", "DLLs [MFC], MFC", "projects [MFC], creating", "DLLs [MFC], creating"]
66
ms.assetid: 05540b93-4781-4a90-aadf-55158313f5b2
@@ -14,9 +14,7 @@ An MFC DLL is a binary file that acts as a shared library of functions that can
1414
1515
### To create an MFC DLL Project using the MFC DLL Wizard
1616

17-
1. Follow the instructions in the help topic [Create a C++ console app project](../../get-started/tutorial-console-cpp.md).
18-
19-
**Note** In the **New Project** dialog box, select the `MFC DLL` icon in the Templates pane to open the MFC DLL Wizard.
17+
1. Follow the instructions in the help topic [Creating an MFC Application](creating-an-mfc-application.md) but choose **MFC Dynamic Link Library** or **MFC DLL** from the list of available templates.
2018

2119
1. Define your application settings using the [application settings](../../mfc/reference/application-settings-mfc-dll-wizard.md) page of the [MFC DLL Wizard](../../mfc/reference/mfc-dll-wizard.md).
2220

0 commit comments

Comments
 (0)