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
The **Add IDL Property** wizard adds a method to an interface defined in an Interface Definition Library (IDL). To use the **Add IDL Property** wizard, your project can't support MFC.
11
+
The **Add IDL Property** wizard adds a property to an interface defined in an Interface Definition Library (IDL). To use the **Add IDL Property** wizard, your project can't support MFC.
12
12
13
13
For example, if you have an ATL project, and it has an `.idl` file in it, use the following procedure to add a property to an interface.
14
14
@@ -37,15 +37,15 @@ For ATL interfaces, the `Get` and `Put` functions are added to the `.cpp` and `.
37
37
38
38
The following section describes the UI that you'll use to add an IDL property:
39
39
40
-
:::image type="content" source="media/add-interface-definition-library-property-wizard.png" alt-text="Screenshot of adding IDL property to the interface.":::
40
+
:::image type="content" source="media/add-interface-definition-library-property-wizard.png" alt-text="Screenshot of Add IDL Property with two parameters: [ in ] int i and [ in ] char c. Return type is HRESULT. Property type is float.":::
41
41
42
42
-**Property name**
43
43
44
44
Sets the name of the property.
45
45
46
46
-**Property type**
47
47
48
-
Sets whether your property will have a getter, setter, or both.
48
+
The data type of the property.
49
49
50
50
-**Return type**
51
51
@@ -120,3 +120,5 @@ Keywords in the Microsoft Interface Definition Language (MIDL) are described in
Use the [Add Property wizard](#add-property-wizard) to add a method to an interface in your project.
12
+
Use the [Add Property wizard](#add-property-wizard) to add a property to an interface in your project.
13
13
14
14
**To add a property to your interface:**
15
15
16
-
1. From the Visual Studio main menu, select **View** > **Class view**. In the [Class View](/visualstudio/ide/viewing-the-structure-of-code) pane, expand the project node to display the interface you want to add the method to.
16
+
1. From the Visual Studio main menu, select **View** > **Class view**. In the [Class View](/visualstudio/ide/viewing-the-structure-of-code) pane, expand the project node to display the interface you want to add the property to.
17
17
18
18
> [!NOTE]
19
19
> You can also add properties to dispinterfaces, which, unless the project is attributed, are nested within the library node.
@@ -50,4 +50,10 @@ The following section describes the UI that you'll use to add a property:
50
50
51
51
Select to add a property setter. By default, the name of the `Set` function is `Set`*PropertyName*. You can edit this name. If you delete the name, the function [`SetNotSupported`](../mfc/reference/colecontrol-class.md#setnotsupported) is inserted into the interface dispatch map. The `Set`*PropertyName* function specifies that the property is writable.
52
52
53
-
For ATL interfaces **Put function** makes the property writable; that is, it creates the `Put` method for setting, or "putting," this property of the object. Select **Get**, **Put**, or both.
53
+
For ATL interfaces **Put function** makes the property writable; that is, it creates the `Put` method for setting, or "putting," this property of the object. Select **Get**, **Put**, or both.
Copy file name to clipboardExpand all lines: docs/mfc/reference/add-interface-definition-library-mfc-property-wizard.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
description: "Learn more about: Use the Microsoft Visual Studio Add IDL MFC property wizard to add a method to an IDL interface in your MFC or ATL project"
2
+
description: "Learn more about: Use the Microsoft Visual Studio Add IDL MFC property wizard to add a property to an IDL interface in your MFC or ATL project"
The **Add IDL MFC Property** wizard adds a method to an Interface Definition Library (IDL) interface defined in your Microsoft Framework Class (MFC) project. To use this 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, you can use the following procedure to add a method to an IDL interface in the solution.
13
+
The **Add IDL MFC Property** wizard adds a property to an Interface Definition Library (IDL) interface defined in your Microsoft Framework Class (MFC) project. To use this 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, you can use the following procedure to add a property to an IDL interface in the solution.
14
14
15
15
**To add an IDL MFC property to your interface**
16
16
@@ -33,7 +33,7 @@ For MFC dispinterfaces, if you select **Member variable** as the implementation
33
33
34
34
The following section describes the **Add IDL MFC Property** wizard:
35
35
36
-
:::image type="content" source="../reference/media/add-interface-definition-library-mfc-property-wizard.png" alt-text="Screenshot of IDL MFC Property Wizard.":::
36
+
:::image type="content" source="../reference/media/add-interface-definition-library-mfc-property-wizard.png" alt-text="Screenshot of Add IDL MFC Property with two parameters: int i and char c. Property type is OLE_COLOR.":::
37
37
38
38
-**Property name**
39
39
@@ -126,3 +126,5 @@ If you're adding a property to an MFC dispinterface using the **Add IDL MFC Prop
0 commit comments