Platform SDK: COM

MFC Class Wizard

The MFC Class Wizard is a component of Visual C++ that reads a type library file and creates dispatch classes for the objects described therein. The MFC Class Wizard writes header and implementation code for your dispatch class and adds the .cpp file to your project. This tool only works with applications that use Microsoft® Foundation Classes (MFC).

You can run the class wizard on type library files created by the MIDL compiler.

To generate dispatch classes from a type library file

  1. On the View menu, click ClassWizard. The MFC Class Wizard dialog box appears.
  2. On the Add Class menu, click From a Type Library. The Import From a Type Library dialog box appears.
  3. Type the name of the type library file in the dialog box. The Confirm Classes dialog box appears.
  4. Click OK.

Visual C++ generates dispatch class and header files for the component and adds them to your project.

For more information, see "Automation Clients: Using Type Libraries" in the Visual C++ documentation.