Using the Windows CE ATL Object Wizard

Projects that you create with the WCE ATL COM AppWizard initially contain no Component Object Model (COM) components. After the project is created, you can use the Windows CE ATL Object Wizard to add components.

The components are derived from various template-based classes that provide default implementations of commonly used COM interfaces. The Windows CE ATL Object Wizard generates the necessary header file declarations, Microsoft Interface Definition Language (MIDL) definitions, and COM interface map entries for the components you add. You write the methods that implement the functionality that is specific to your components. You also can override the implementations of standard interface methods inherited from the ATL classes.

When you use the Windows CE ATL Object Wizard to create ActiveX controls, it registers them in the emulation registry. Therefore, you must install and run emulation before creating Windows CE ActiveX controls.

    To create a new ActiveX control

  1. Choose New ATL Object on the Visual Studio Insert menu.
  2. In the ATL Object Wizard, choose the object, control, or dialog box you want to create.
  3. Choose Next.
  4. In the ATL Object Wizard Properties dialog box, edit the names, properties, and attributes of your new ActiveX control.
  5. Choose OK.

    To add a registered ActiveX Control to your project

  1. On the Visual Studio Project menu, point to Add To Project and choose Components and Controls.
  2. Double-click the Registered WCE ActiveX Controls tab in the Components and Controls Gallery dialog box.
  3. Choose the ActiveX control you want to add to your project. The name of the control appears in the File name field.
  4. Choose Insert.