You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ide/adding-a-method-visual-cpp.md
+16-17Lines changed: 16 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ You can use the [add method wizard](#add-method-wizard) to add a method to an in
24
24
25
25
1. In the Add Method Wizard, provide the information to create the method.
26
26
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.
28
28
29
29
1. Select **OK** to add the method.
30
30
@@ -35,13 +35,13 @@ You can use the [add method wizard](#add-method-wizard) to add a method to an in
35
35
36
36
## Add method wizard
37
37
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.
39
39
40
40
### Names
41
41
42
42
-**Method name**
43
43
44
-
Sets the name for the method.
44
+
Sets the method name.
45
45
46
46
|Interface type|Description|
47
47
|--------------------|-----------------|
@@ -51,7 +51,7 @@ Use this wizard to add a method to an interface. The wizard displays different o
51
51
52
52
-**Internal name**
53
53
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.
55
55
56
56
|Interface type|Description|
57
57
|--------------------|-----------------|
@@ -73,7 +73,7 @@ Use this wizard to add a method to an interface. The wizard displays different o
73
73
74
74
-**Method type**
75
75
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.
77
77
78
78
If you select one of the methods in the **Method name** list, select either the stock implementation or a custom implementation.
79
79
@@ -84,22 +84,20 @@ Use this wizard to add a method to an interface. The wizard displays different o
84
84
85
85
-**Parameter type**
86
86
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.
88
88
89
89
-**Parameter name**
90
90
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.
94
92
95
93
> [!NOTE]
96
94
> 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.
97
95
98
-
-**`+`**
96
+
-**+**
99
97
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**.
101
99
102
-
-**`x`**
100
+
-**x**
103
101
104
102
Removes the parameter you select in **Parameters** from the list.
105
103
@@ -110,12 +108,13 @@ Use this wizard to add a method to an interface. The wizard displays different o
110
108
-**Parameter attributes**
111
109
112
110
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)**
|**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.
0 commit comments