Creating a Starter Automation Server

The following procedure describes values you will enter into the various AppWizard dialog boxes in order to create the AutoClik starter files.

To create a starter Automation server application

  1. On the File menu, click New.

    The New dialog box appears.

  2. Click the Projects tab.

  3. Click MFC AppWizard (exe).

  4. In the Project name box, type AutoClik.

    AppWizard will create a project directory with this name under the main (root) directory specified in the Location box.

  5. If necessary, use the Location box to specify a different root directory for the AutoClik project files that AppWizard creates under the AutoClik project directory.

  6. If any check boxes other than Win32 appear in the Platforms box, clear them.

  7. Click OK.

    AppWizard creates the project directory and the MFC AppWizard – Step 1 dialog box appears.

  8. Click Next in the dialog boxes for AppWizard Steps 1 and 2 to accept the default options.

  9. In the MFC AppWizard – Step 3 of 6 dialog box, click the Automation check box and click Next.

  10. In the MFC AppWizard – Step 4 of 6 dialog box, click the Advanced button.

    The Advanced Options dialog box appears, with the Document Template Strings tab selected.

    • In the File extension box, specify ack.

      The specified file extension is reflected in the Filter Name box.

    • In the File type ID box, edit it to read AutoClick.Document.

      This identifier is initially created by AppWizard, based on the project name. The client application (such as Autodriv) uses this name to access the Automation object, or dispatch interface. This name corresponds to the regFileTypeID string in the CDocTemplate::GetDocString function.

    • Change the Main frame caption to AutoClick (optional).

      This string gets displayed in the title bar of the running application.

    • In the Doc type name box, change AutoCl to AClick (optional).

      Notice that the change is reflected in the File new name (short name) box as well. This name corresponds to the fileNewName string in CDocTemplate::GetDocString.

    • In the Filter name box, change AutoCl Files to AutoClick Files (optional).

    Note   The File Type ID and Doc Type Name strings are discussed further in the next topic, Analyzing the Dispatch Interface Name.

  11. Click Close, and then click Next to accept the options for the Step 4 and Step 5 dialog boxes.

  12. Optionally, in the MFC AppWizard – Step 6 of 6 dialog box, make the following changes:
    • Change class name CAutoClikApp to CAutoClickApp.

    • Change class name CAutoClikDoc to CAutoClickDoc. Change the header and implementation files accordingly.

    • Change class name CAutoClikView to CAutoClickView. Change the header and implementation files accordingly.
  13. Click Finish.

    You may be prompted with the following message:

    “A unique class ID already exists in the registration database for this document type. Use existing ID?”

    This message appears if you ran the Step 3 version of AutoClik. Running AutoClik adds an entry to the registry for its document type (AutoClick.Document).

  14. Click Yes. Responding Yes tells AppWizard to overwrite the existing registry entries.

    The New Project Information dialog box appears, summarizing the settings and features AppWizard will generate for you when it creates your project.

    You might want to take a moment to examine the application type, classes, and features that AppWizard automatically provides.

  15. Click OK in the New Project Information dialog box.

    AppWizard creates all necessary files and opens the AutoClik project.