--- title: "Adding an Event (Visual C++) | Microsoft Docs" ms.custom: "" ms.date: "11/04/2016" ms.reviewer: "" ms.suite: "" ms.technology: ["cpp-ide"] ms.tgt_pltfrm: "" ms.topic: "article" dev_langs: ["C++"] helpviewer_keywords: ["ActiveX controls [C++], adding events to", "MFC ActiveX controls [C++], adding events", "events [C++], ActiveX controls"] ms.assetid: fe34832a-edfc-4f86-aacb-8df77001873d caps.latest.revision: 6 author: "mikeblome" ms.author: "mblome" manager: "ghogen" --- # Adding an Event (Visual C++) From Class View, you can add an event using the [Add Event Wizard](../ide/add-event-wizard.md) only to the control class in your [MFC ActiveX control](../mfc/reference/creating-an-mfc-activex-control.md) project. If you want to add an event to another type of project, use the **Events** button in the [Properties window](/visualstudio/ide/reference/properties-window). ### To add an event to your MFC ActiveX control project 1. In Class View, expand the project node to display the classes in the project. 2. Right-click the project's control class. 3. On the shortcut menu, click **Add**, and then click **Add Event** to display the Add Event Wizard. 4. Provide the event information in the appropriate wizard boxes. 5. Click **Finish** to add the event to the project. ## See Also [Adding Functionality with Code Wizards](../ide/adding-functionality-with-code-wizards-cpp.md) [Adding a Class](../ide/adding-a-class-visual-cpp.md) [Adding a Member Variable](../ide/adding-a-member-variable-visual-cpp.md) [Adding a Member Function](../ide/adding-a-member-function-visual-cpp.md) [MFC Message Handler](../mfc/reference/adding-an-mfc-message-handler.md) [Navigating the Class Structure](../ide/navigating-the-class-structure-visual-cpp.md)