Skip to content

Commit dd086e8

Browse files
committed
Update after tech review
1 parent 1416eb9 commit dd086e8

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

docs/mfc/reference/add-idl-mfc-method-wizard.md

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
---
22
description: "Learn more about: Use a Microsoft Visual Studio wizard to add a method to an IDL interface in your MFC or ATL project"
33
title: "Add an IDL MFC method"
4-
ms.date: "03/24/2022"
4+
ms.date: "03/28/2022"
55
f1_keywords: ["vc.codewiz.method.overview", "vc.codewiz.method.idlattrib"]
66
helpviewer_keywords: ["add IDL MFC method wizard [C++]", "IDL MFC methods [C++], adding", "methods [C++], adding using wizards", "IDL attributes, add an IDL MFC method wizard"]
77
ms.custom: devdivchpfy22
88
---
99

1010
# Add an IDL MFC method
1111

12-
The **Add IDL MFC Method** wizard adds a method to an interface defined in an Interface Definition Library (IDL) in a Microsoft Framework Class (MFC) project. To use the **Add IDL MFC Method** wizard you must be in an MFC Project, ActiveX project or an ATL project that supports MFC.
13-
14-
If the ATL project doesn't support MFC, only the wizard that adds a method to an IDL interface is available. For example, if you have a Microsoft ActiveX control project, and you open the IDL library, using following procedure you can add the method to interface. If the project contains a class associated with the interface, the wizard will add the method to the class, too.
12+
The **Add IDL MFC Method** wizard adds a method to an interface defined in an Interface Definition Library (IDL) in a Microsoft Framework Class (MFC) project. To use the **Add IDL MFC Method** wizard you must be in an MFC Project, ActiveX project or an ATL project that supports MFC. For example, if you have a Microsoft ActiveX control project, and you open the IDL library, using following procedure you can add the method to interface. If the project contains a class associated with the interface, the wizard will add the method to the class, too.
1513

1614
This wizard differs from the [Add Method](../../ide/adding-a-method-visual-cpp.md) wizard (which adds a method to an IDL interface) in the following ways:
1715

@@ -20,22 +18,14 @@ This wizard differs from the [Add Method](../../ide/adding-a-method-visual-cpp.m
2018
- It adds the following entries if a Dispatch map is found in the project.
2119
```cpp
2220
BEGIN_DISPATCH_MAP(CMFCApplication2Doc, CDocument)
23-
DISP_FUNCTION_ID(CMFCApplication2Doc, "name", dispidname, name, VT_EMPTY, VTS_NONE)
24-
DISP_FUNCTION_ID(CMFCApplication2Doc, "nombre", dispidnombre, nombrenom, VT_EMPTY, VTS_NONE)
21+
DISP_FUNCTION_ID(CMFCApplication2Doc, "methodName", dispidmethodName, internalName, VT_EMPTY, VTS_NONE)
2522
END_DISPATCH_MAP()
2623
```
2724
- It generates the following associated method implementations:
2825
```cpp
29-
void CMFCApplication2Doc::name()
26+
void CMFCApplication2Doc::internalName()
3027
{
3128
AFX_MANAGE_STATE(AfxGetAppModuleState());
32-
33-
// TODO: Add your dispatch handler code here
34-
}
35-
void CMFCApplication2Doc::nombrenom()
36-
{
37-
AFX_MANAGE_STATE(AfxGetAppModuleState());
38-
3929
// TODO: Add your dispatch handler code here
4030
}
4131
```

0 commit comments

Comments
 (0)