Skip to content

Commit 5d2591e

Browse files
committed
Update for VS 2022
1 parent 878ef91 commit 5d2591e

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

docs/ide/adding-a-method-visual-cpp.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ You can use the [add method wizard](#add-method-wizard) to add a method to an in
2424

2525
1. In the Add Method Wizard, provide the information to create the method.
2626

27-
1. Specify any interface definition language settings for the method in the [IDL attributes](#idl-attributes-add-method-wizard) page of the wizard.
27+
1. Specify interface definition language settings for the method in the [IDL attributes](#idl-attributes-add-method-wizard) page of the wizard.
2828

2929
1. Select **OK** to add the method.
3030

@@ -35,13 +35,13 @@ You can use the [add method wizard](#add-method-wizard) to add a method to an in
3535

3636
## Add method wizard
3737

38-
Use this wizard to add a method to an interface. The wizard displays different options depending on the project or interface type to which you're adding a method.
38+
Use this wizard to add a method to an interface.
3939

4040
### Names
4141

4242
- **Method name**
4343

44-
Sets the name for the method.
44+
Sets the method name.
4545

4646
|Interface type|Description|
4747
|--------------------|-----------------|
@@ -51,7 +51,7 @@ Use this wizard to add a method to an interface. The wizard displays different o
5151

5252
- **Internal name**
5353

54-
Available for only custom methods added to an MFC dispinterface. Sets the name used in the dispatch map, the header (.h) file, and the implementation (.cpp) file. By default, this name is the same as **Method name**. You can change the method name, if you're working with an MFC dispinterface or if you're adding a custom method to an MFC ActiveX control dispinterface.
54+
Available for only custom methods added to an MFC dispinterface. Sets the name used in the dispatch map, the header (`.h`) file, and the implementation (`.cpp`) file. By default, this name is the same as **Method name**. You can change the method name, if you're working with an MFC dispinterface or if you're adding a custom method to an MFC ActiveX control dispinterface.
5555

5656
|Interface type|Description|
5757
|--------------------|-----------------|
@@ -73,7 +73,7 @@ Use this wizard to add a method to an interface. The wizard displays different o
7373

7474
- **Method type**
7575

76-
Available only for MFC ActiveX controls. If you provide a method name in the **Method name** box, rather than selecting a method from the list, this box is unavailable.
76+
Available only for MFC projects, ActiveX control projects, and ATL projects that support MFC. If you provide a method name in the **Method name** box, rather than selecting a method from the list, this box is unavailable.
7777

7878
If you select one of the methods in the **Method name** list, select either the stock implementation or a custom implementation.
7979

@@ -84,22 +84,20 @@ Use this wizard to add a method to an interface. The wizard displays different o
8484

8585
- **Parameter type**
8686

87-
Sets the data type of the parameter. Select the type from the list.
87+
Sets the data type of the parameter. You can type it or select the type from the list.
8888

8989
- **Parameter name**
9090

91-
Sets the name of a parameter to pass through your method. After you type the name, select **`+`** to add it to the list of parameters that will pass through your method. If you don't provide a parameter name, the wizard ignores any parameter attributes (ATL only) or **Parameter type** selections.
92-
93-
When you select **`+`**, the parameter name appears in **Parameters**.
91+
Sets the name of a parameter. Select **+** to add the parameter to the list of parameters. If you don't provide a parameter name, the wizard ignores any parameter attributes (ATL only) or **Parameter type** selections.
9492

9593
> [!NOTE]
9694
> If you supply a parameter name and then select **OK** before you select **+**, the parameter isn't added to the method. You must find the method and insert the parameter manually.
9795
98-
- **`+`**
96+
- **+**
9997

100-
Adds the parameter you specify in **Parameter name**, and its type and parameter attributes, to **Parameters**. Select **`+`** to add a parameter to the list.
98+
Adds the parameter to the list of parameters. Specify parameter name in **Parameter name**, and its type and parameter attributes, to **Parameters**.
10199

102-
- **`x`**
100+
- **x**
103101

104102
Removes the parameter you select in **Parameters** from the list.
105103

@@ -110,12 +108,13 @@ Use this wizard to add a method to an interface. The wizard displays different o
110108
- **Parameter attributes**
111109

112110
Sets any other attributes for the parameter specified in **Parameter name**.
111+
1. **Infer in/out parameters values from types**
112+
113+
Select the checkbox to infer in or out parameter values from type of parameter.
114+
115+
1. **Set the last parameter as the return value (retval)**
113116

114-
|Parameter attribute|Description|Allowed combinations|
115-
|-------------------------|-----------------|--------------------------|
116-
|**In**|Indicates that the parameter is passed from the calling procedure to the called procedure.|`in` only<br /><br /> `in` and `out`|
117-
|**Out**|Indicates that the pointer parameter is returned from the called procedure to the calling procedure (from the server to the client).|`out` only<br /><br /> `in` and `out`<br /><br /> `out` and `retval`|
118-
|**Retval**|Indicates that the parameter receives the return value of the member.|`retval` and `out`|
117+
Select the checkbox to set the last parameter as the return value.
119118

120119
## IDL attributes, add method wizard
121120

0 commit comments

Comments
 (0)