Skip to content

Commit 201f7c7

Browse files
authored
Merge pull request #4184 from rachana-satao/RAS-cpp-US1931119-1
Updating the steps for VS2022
2 parents 0ecab9e + 5700b9f commit 201f7c7

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

‎docs/mfc/reference/adding-an-mfc-class-from-a-type-library.md‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
---
22
description: "Learn more about: Adding an MFC Class from a Type Library"
33
title: "Adding an MFC Class from a Type Library"
4-
ms.date: "11/04/2016"
4+
ms.date: "03/21/2022"
55
helpviewer_keywords: ["classes [MFC], adding MFC", "MFC, adding classes from type libraries", "type libraries, adding MFC classes from"]
66
ms.assetid: aba40476-3cfb-47af-990e-ae2e9e0d79cf
7+
ms.custom: devdivchpfy22
78
---
89
# Adding an MFC Class from a Type Library
910

1011
Use this wizard to create an MFC class from an interface in an available type library. You can add an MFC class to an [MFC application](../../mfc/reference/creating-an-mfc-application.md), an [MFC DLL](../../mfc/reference/creating-an-mfc-dll-project.md), or an [MFC ActiveX control](../../mfc/reference/creating-an-mfc-activex-control.md).
1112

1213
> [!NOTE]
13-
> You do not need to create your MFC project with Automation enabled to add a class from a type library.
14+
> You don't need to create your MFC project with Automation enabled to add a class from a type library.
1415
1516
A type library contains a binary description of the interfaces exposed by a component, defining the methods along with their parameters and return types. Your type library must be registered for it to appear in the **Available type libraries** list in the Add Class from Typelib Wizard.
1617

1718
### To add an MFC class from a type library
1819

1920
1. In either **Solution Explorer** or [Class View](/visualstudio/ide/viewing-the-structure-of-code), right-click the name of the project to which you want to add the class.
2021

21-
1. From the shortcut menu, click **Add**, and then click **Add Class**.
22+
1. From the shortcut menu, select **Add**, and then select **New Item**.
2223

23-
1. In the [Add Class](../../ide/adding-a-class-visual-cpp.md#add-class-dialog-box) dialog box, in the Templates pane, click **MFC Class from Typelib**, and then click **Open** to display the [Add Class from Typelib Wizard](../../mfc/reference/add-class-from-typelib-wizard.md).
24+
1. In the **Add New Item** dialog, select **Installed** packages and then select **Visual C++**.
25+
26+
1. In the Templates pane, select **MFC Class from Typelib**, and then select **Add** to display the [Add Class from Typelib Wizard](../../mfc/reference/add-class-from-typelib-wizard.md).
2427

2528
In the wizard, you can add more than one class in a type library. Likewise, you can add classes from more than one type library in a single wizard session.
2629

0 commit comments

Comments
 (0)