Skip to content

Commit 00c8371

Browse files
authored
Merge pull request #2309 from mikeblome/mb-1068
Updates across MFC for updated Class Wizard UI
2 parents 71767b4 + 09e1bf7 commit 00c8371

File tree

62 files changed

+138
-250
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+138
-250
lines changed

.openpublishing.redirection.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@
624624
"source_path": "docs/build/reference/input-and-output-manifest-tool.md",
625625
"redirect_url": "/cpp/build/reference/manifest-tool-property-pages",
626626
"redirect_document_id": false
627-
},
627+
},
628628
{
629629
"source_path": "docs/build/reference/isolated-com-manifest-tool.md",
630630
"redirect_url": "/cpp/build/reference/manifest-tool-property-pages",
@@ -7320,6 +7320,11 @@
73207320
"redirect_url": "/cpp/mfc/using-the-mfc-source-files",
73217321
"redirect_document_id": false
73227322
},
7323+
{
7324+
"source_path": "docs/mfc/document-template-strings-mfc-add-class-wizard.md",
7325+
"redirect_url": "/cpp/mfc/reference/mfc-add-class-wizard",
7326+
"redirect_document_id": false
7327+
},
73237328
{
73247329
"source_path": "docs/mfc/automatic-linking-of-mfc-library-version.md",
73257330
"redirect_url": "/cpp/mfc/mfc-library-versions",

docs/ide/adding-functionality-with-code-wizards-cpp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ Once you have created a project, you will want to change or add to that project'
2222

2323

2424
> [!NOTE]
25-
> You can now add message handlers and map messages to them and override MFC virtual functions using the [Properties window](/visualstudio/ide/reference/properties-window).
25+
> You can add message handlers and map messages to them and override MFC virtual functions using the [MFC Class Wizard](../mfc/reference/mfc-class-wizard.md).
2626
2727
## Accessing C++ Code Wizards
2828

2929
There are three locations where you can access C++ code wizards:
3030

31-
- On the **Project** menu, the **Add New Item** command allows you to bring up the `Add New Item` dialog box, which helps you to add new files to your project. The **Add Class** command displays the [Add Class](../ide/add-class-dialog-box.md) dialog box, which in turn open wizards for each of the class types you can add to your project. The **Add Resource** command displays the [Add Resource](../windows/add-resource-dialog-box.md) dialog box, from which you can create or select a resource to add to your project.
31+
- On the **Project** menu, the **Add New Item** command allows you to bring up the `Add New Item` dialog box, which helps you to add new files to your project. The **Add Class** command displays the [Add Class](../ide/add-class-dialog-box.md) dialog box, which in turn open wizards for each of the class types you can add to your project. For MFC classes, use the [MFC Class Wizard](../mfc/reference/mfc-class-wizard.md). The **Add Resource** command displays the [Add Resource](../windows/add-resource-dialog-box.md) dialog box, from which you can create or select a resource to add to your project.
3232

3333
If you highlight a class or an interface in your project in Class View, the **Project** menu also displays the following commands:
3434

docs/mfc/activex-control-containers-handling-events-from-an-activex-control.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,26 @@ ms.assetid: f9c106db-052f-4e32-82ad-750646aa760b
66
---
77
# ActiveX Control Containers: Handling Events from an ActiveX Control
88

9-
This article discusses using the Properties window to install event handlers for ActiveX controls in an ActiveX control container. The event handlers are used to receive notifications (from the control) of certain events and perform some action in response. This notification is called "firing" the event.
9+
This article discusses using the **Properties** window (in **Class View**) to install event handlers for ActiveX controls in an ActiveX control container. The event handlers are used to receive notifications (from the control) of certain events and perform some action in response. This notification is called "firing" the event.
1010

1111
>[!IMPORTANT]
1212
> ActiveX is a legacy technology that should not be used for new development. For more information about modern technologies that supersede ActiveX, see [ActiveX Controls](activex-controls.md).
1313
1414
> [!NOTE]
1515
> This article uses a dialog-based ActiveX control container project named Container and an embedded control named Circ as examples in the procedures and code.
1616
17-
Using the Events button in the Properties window, you can create a map of events that can occur in your ActiveX control container application. This map, called an "event sink map,'' is created and maintained by Visual C++ when you add event handlers to the control container class. Each event handler, implemented with an event map entry, maps a specific event to a container event handler member function. This event handler function is called when the specified event is fired by the ActiveX control object.
17+
Using the Events button in the **Properties** window (in **Class View**), you can create a map of events that can occur in your ActiveX control container application. This map, called an "event sink map,'' is created and maintained by Visual C++ when you add event handlers to the control container class. Each event handler, implemented with an event map entry, maps a specific event to a container event handler member function. This event handler function is called when the specified event is fired by the ActiveX control object.
1818

1919
For more information on event sink maps, see [Event Sink Maps](../mfc/reference/event-sink-maps.md) in the *Class Library Reference*.
2020

2121
## <a name="_core_event_handler_modifications_to_the_project"></a> Event Handler Modifications to the Project
2222

23-
When you use the Properties window to add event handlers, an event sink map is declared and defined in your project. The following statements are added to the control .CPP file the first time an event handler is added. This code declares an event sink map for the dialog box class (in this case, `CContainerDlg`):
23+
When you use the **Properties** window to add event handlers, an event sink map is declared and defined in your project. The following statements are added to the control .CPP file the first time an event handler is added. This code declares an event sink map for the dialog box class (in this case, `CContainerDlg`):
2424

2525
[!code-cpp[NVC_MFC_AxCont#8](../mfc/codesnippet/cpp/activex-control-containers-handling-events-from-an-activex-control_1.cpp)]
2626
[!code-cpp[NVC_MFC_AxCont#9](../mfc/codesnippet/cpp/activex-control-containers-handling-events-from-an-activex-control_2.cpp)]
2727

28-
As you use the Properties window to add events, an event map entry (`ON_EVENT`) is added to the event sink map and an event handler function is added to the container's implementation (.CPP) file.
28+
As you use the **Properties** window to add events, an event map entry (`ON_EVENT`) is added to the event sink map and an event handler function is added to the container's implementation (.CPP) file.
2929

3030
The following example declares an event handler, called `OnClickInCircCtrl`, for the Circ control's `ClickIn` event:
3131

@@ -41,11 +41,11 @@ For more information on event sink macros, see [Event Sink Maps](../mfc/referenc
4141

4242
1. From Class View, select the dialog class that contains the ActiveX control. For this example, use `CContainerDlg`.
4343

44-
1. In the Properties window, click the **Events** button.
44+
1. In the **Properties** window, click the **Events** button.
4545

46-
1. In the Properties window, select the control ID of the embedded ActiveX control. For this example, use `IDC_CIRCCTRL1`.
46+
1. In the **Properties** window, select the control ID of the embedded ActiveX control. For this example, use `IDC_CIRCCTRL1`.
4747

48-
The Properties window displays a list of events that can be fired by the embedded ActiveX control. Any member function shown in bold already has handler functions assigned to it.
48+
The **Properties** window displays a list of events that can be fired by the embedded ActiveX control. Any member function shown in bold already has handler functions assigned to it.
4949

5050
1. Select the event you want the dialog class to handle. For this example, select **Click**.
5151

docs/mfc/activex-control-containers-viewing-and-modifying-control-properties.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The first step in viewing the control's properties is to add an instance of the
2424

2525
1. Select the ActiveX control in the dialog box.
2626

27-
1. From the Properties window, click the **Properties** button.
27+
1. From the **Properties** window, click the **Properties** button.
2828

2929
Use the **Properties** dialog box to modify and test new properties immediately.
3030

docs/mfc/automation-servers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The framework's principal mechanism for supporting Automation is the dispatch ma
2525

2626
[!code-cpp[NVC_MFCAutomation#1](../mfc/codesnippet/cpp/automation-servers_1.cpp)]
2727

28-
The Properties window and Class View assist in maintaining dispatch maps. When you add a new method or property to a class, Visual C++ adds a corresponding `DISP_FUNCTION` or `DISP_PROPERTY` macro with parameters indicating the class name, external and internal names of the method or property, and data types.
28+
The [Class Wizard](reference/mfc-class-wizard.md) and Class View assist in maintaining dispatch maps. When you add a new method or property to a class, Visual Studio adds a corresponding `DISP_FUNCTION` or `DISP_PROPERTY` macro with parameters indicating the class name, external and internal names of the method or property, and data types.
2929

3030
The **Add Class** dialog box also simplifies the declaration of Automation classes and the management of their properties and operations. When you use the Add Class dialog box to add a class to your project, you specify its base class. If the base class allows Automation, the Add Class dialog box displays controls you use to specify whether the new class should support Automation, whether it is "OLE creatable" (that is, whether objects of the class can be created on a request from a COM client), and the external name for the COM client to use.
3131

docs/mfc/command-routing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
title: "Command Routing"
3-
ms.date: "11/04/2016"
3+
ms.date: "09/06/2019"
44
helpviewer_keywords: ["MFC, command routing", "command handling [MFC], routing commands", "handlers [MFC]", "handlers, command [MFC]", "command routing"]
55
ms.assetid: 9393a956-bdd4-47c5-9013-dbd680433f93
66
---
77
# Command Routing
88

9-
Your responsibility in working with commands is limited to making message-map connections between commands and their handler functions, a task for which you use the Properties window. You must also write most command handlers.
9+
Your responsibility in working with commands is limited to making message-map connections between commands and their handler functions, a task for which you use the [MFC Class Wizard](reference/mfc-class-wizard.md). You must also write the code for the command handlers.
1010

1111
Windows messages are usually sent to the main frame window, but command messages are then routed to other objects. The framework routes commands through a standard sequence of command-target objects, one of which is expected to have a handler for the command. Each command-target object checks its message map to see if it can handle the incoming message.
1212

docs/mfc/commonly-overridden-member-functions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Commonly Overridden Member Functions"
3-
ms.date: "11/04/2016"
3+
ms.date: "09/06/2019"
44
helpviewer_keywords: ["CDialog class [MFC], members", "OnInitDialog function", "dialog classes [MFC], commonly overridden member functions", "OnCancel function", "overriding, dialog class members", "OnOK function", "MFC dialog boxes [MFC], overriding member functions"]
55
ms.assetid: 78eb566c-e361-4c86-8db5-c7e2791b249a
66
---
@@ -16,7 +16,7 @@ The following table lists the most likely member functions to override in your `
1616
|`OnOK`|**BN_CLICKED** for button **IDOK**|Respond when the user clicks the OK button.|
1717
|`OnCancel`|**BN_CLICKED** for button **IDCANCEL**|Respond when the user clicks the Cancel button.|
1818

19-
`OnInitDialog`, `OnOK`, and `OnCancel` are virtual functions. To override them, you declare an overriding function in your derived dialog class using the [Properties window](/visualstudio/ide/reference/properties-window).
19+
`OnInitDialog`, `OnOK`, and `OnCancel` are virtual functions. To override them, you declare an overriding function in your derived dialog class using the [MFC Class Wizard](reference/mfc-class-wizard.md).
2020

2121
`OnInitDialog` is called just before the dialog box is displayed. You must call the default `OnInitDialog` handler from your override — usually as the first action in the handler. By default, `OnInitDialog` returns **TRUE** to indicate that the focus should be set to the first control in the dialog box.
2222

docs/mfc/creating-an-extended-combo-box-control.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ How the extended combo box control is created depends on whether you are using t
1616

1717
1. Use the [Add Member Variable Wizard](../ide/adding-a-member-variable-visual-cpp.md) to add a member variable of type [CComboBoxEx](../mfc/reference/ccomboboxex-class.md) with the Control property. You can use this member to call `CComboBoxEx` member functions.
1818

19-
1. Use the Properties window to map handler functions in the dialog class for any extended combo box control notification messages you need to handle (see [Mapping Messages to Functions](../mfc/reference/mapping-messages-to-functions.md)).
19+
1. Use the [Class Wizard](reference/mfc-class-wizard.md) to map handler functions in the dialog class for any extended combo box control notification messages you need to handle (see [Mapping Messages to Functions](../mfc/reference/mapping-messages-to-functions.md)).
2020

2121
1. In [OnInitDialog](../mfc/reference/cdialog-class.md#oninitdialog), set any additional styles for the `CComboBoxEx` object.
2222

docs/mfc/creating-the-date-and-time-picker-control.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ How the date and time picker control is created depends on whether you are using
1616

1717
1. Use the [Add Member Variable Wizard](../ide/adding-a-member-variable-visual-cpp.md) to add a member variable of type [CDateTimeCtrl](../mfc/reference/cdatetimectrl-class.md) with the Control property. You can use this member to call `CDateTimeCtrl` member functions.
1818

19-
1. Use the Properties window to map handler functions in the dialog class for any date time picker control [notification](../mfc/processing-notification-messages-in-date-and-time-picker-controls.md) messages you need to handle (see [Mapping Messages to Functions](../mfc/reference/mapping-messages-to-functions.md)).
19+
1. Use the [Class Wizard](reference/mfc-class-wizard.md) to map handler functions in the dialog class for any date time picker control [notification](../mfc/processing-notification-messages-in-date-and-time-picker-controls.md) messages you need to handle (see [Mapping Messages to Functions](../mfc/reference/mapping-messages-to-functions.md)).
2020

2121
1. In [OnInitDialog](../mfc/reference/cdialog-class.md#oninitdialog), set any additional styles for the `CDateTimeCtrl` object.
2222

docs/mfc/creating-the-header-control.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The header control is not directly available in the dialog editor (although you
1616

1717
1. Add items to the header control.
1818

19-
1. Use the Properties window to map handler functions in the dialog class for any header-control notification messages you need to handle (see [Mapping Messages to Functions](../mfc/reference/mapping-messages-to-functions.md)).
19+
1. Use the [Class Wizard](reference/mfc-class-wizard.md) to map handler functions in the dialog class for any header-control notification messages you need to handle (see [Mapping Messages to Functions](../mfc/reference/mapping-messages-to-functions.md)).
2020

2121
### To put a header control in a view (not a CListView)
2222

@@ -26,7 +26,7 @@ The header control is not directly available in the dialog editor (although you
2626

2727
1. Add items to the header control.
2828

29-
1. Use the Properties window to map handler functions in the view class for any header-control notification messages you need to handle (see [Mapping Messages to Functions](../mfc/reference/mapping-messages-to-functions.md)).
29+
1. Use the [Class Wizard](reference/mfc-class-wizard.md) to map handler functions in the view class for any header-control notification messages you need to handle (see [Mapping Messages to Functions](../mfc/reference/mapping-messages-to-functions.md)).
3030

3131
In either case, the embedded control object is created when the view or dialog object is created. Then you must call [CHeaderCtrl::Create](../mfc/reference/cheaderctrl-class.md#create) to create the control window. To position the control, call [CHeaderCtrl::Layout](../mfc/reference/cheaderctrl-class.md#layout) to determine the control's initial size and position and [SetWindowPos](../mfc/reference/cwnd-class.md#setwindowpos) to set the position you want. Then add items as described in [Adding Items to the Header Control](../mfc/adding-items-to-the-header-control.md).
3232

docs/mfc/creating-the-list-control.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ How the list control ([CListCtrl](../mfc/reference/clistctrl-class.md)) is creat
1414

1515
1. Use the [Add Member Variable Wizard](../ide/adding-a-member-variable-visual-cpp.md) to add a member variable of type `CListCtrl` with the Control property. You can use this member to call `CListCtrl` member functions.
1616

17-
1. Use the Properties window to map handler functions in the dialog class for any list control notification messages you need to handle (see [Mapping Messages to Functions](../mfc/reference/mapping-messages-to-functions.md)).
17+
1. Use the [Class Wizard](reference/mfc-class-wizard.md) to map handler functions in the dialog class for any list control notification messages you need to handle (see [Mapping Messages to Functions](../mfc/reference/mapping-messages-to-functions.md)).
1818

1919
1. In [OnInitDialog](../mfc/reference/cdialog-class.md#oninitdialog), set the styles for the `CListCtrl`. See [Changing List Control Styles](../mfc/changing-list-control-styles.md). This determines the kind of "view" you get in the control, although you can change the view later.
2020

docs/mfc/creating-the-month-calendar-control.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ How the month calendar control is created depends on whether you are using the c
1616

1717
1. Use the [Add Member Variable Wizard](../ide/adding-a-member-variable-visual-cpp.md) to add a member variable of type [CMonthCalCtrl](../mfc/reference/cmonthcalctrl-class.md) with the Control property. You can use this member to call `CMonthCalCtrl` member functions.
1818

19-
1. Use the Properties window to map handler functions in the dialog class for any month calendar control notification messages you need to handle (see [Mapping Messages to Functions](../mfc/reference/mapping-messages-to-functions.md)).
19+
1. Use the [Class Wizard](reference/mfc-class-wizard.md) to map handler functions in the dialog class for any month calendar control notification messages you need to handle (see [Mapping Messages to Functions](../mfc/reference/mapping-messages-to-functions.md)).
2020

2121
1. In [OnInitDialog](../mfc/reference/cdialog-class.md#oninitdialog), set any additional styles for the `CMonthCalCtrl` object.
2222

docs/mfc/creating-your-dialog-class.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
22
title: "Creating Your Dialog Class"
3-
ms.date: "11/04/2016"
3+
ms.date: "09/06/2019"
44
helpviewer_keywords: ["dialog boxes [MFC], creating", "MFC dialog boxes [MFC], creating", "files [MFC], creating", "dialog classes [MFC], Add Class Wizard", "dialog classes [MFC], creating"]
55
ms.assetid: d5321741-da41-47a8-bb1c-6a0e8b28c4c1
66
---
77
# Creating Your Dialog Class
88

99
For each dialog box in your program, create a new dialog class to work with the dialog resource.
1010

11-
[Adding a Class](../ide/adding-a-class-visual-cpp.md) explains how to create a new dialog class. When you create a dialog class with the Add Class Wizard, it writes the following items in the .H and .CPP files you specify:
11+
[Adding a Class](../ide/adding-a-class-visual-cpp.md) explains how to create a new dialog class. When you create a dialog class with the [Class Wizard](reference/mfc-class-wizard.md), it writes the following items in the .h and .cpp files you specify:
1212

13-
In the .H file:
13+
In the .h file:
1414

1515
- A class declaration for the dialog class. The class is derived from [CDialog](../mfc/reference/cdialog-class.md).
1616

17-
In the .CPP file:
17+
In the .cpp file:
1818

1919
- A message map for the class.
2020

0 commit comments

Comments
 (0)