Spread 8 ReadMe
C++ Development Considerations

Using the Spread ActiveX Control in MSVC 6.0

To use the Spread ActiveX controls in Microsoft Visual C version 6.0 (MSVC 6.0), you must generate wrapper classes for the controls. To generate a wrapper class, you must use an existing application that supports ActiveX controls, or you must create such an application.

Complete the steps in the following section to create an application that supports ActiveX controls. If you already have such an application, proceed to the section "Generating a C++ Wrapper in MSVC 6.0."

Creating a New Application That Supports ActiveX Controls

To generate a new application that supports ActiveX controls

  1. In MSVC 6.0, choose New from the File menu.
  2. In the New dialog box, on the Projects tab,
    1. Choose MFC AppWizard (exe).
    2. Provide the project file name and path
    3. Choose the OK button.
  3. In the MFC AppWizard - Step 1 dialog box, choose the Finish button. This accepts the defaults for all choices.
  4. In the New Project Information dialog box, choose the OK button.

MSVC 6.0 generates an application that supports ActiveX controls.

Generating a C++ Wrapper in MSVC 6.0

There are two methods for generating C++ wrappers in MSVC 6.0. You can place the control on a dialog, or you can add the control as an application component.

To generate a C++ wrapper with the control on a dialog:

  1. Open an existing dialog or create a new dialog in MSVC 6.0.

    To create a new dialog, select Resource from the Insert menu. Then, in the Insert Resource dialog box, select Dialog from the Resource type list, and then choose the New button.

  2. Click the right mouse button in the dialog to display the pop-up menu.
  3. Choose Insert ActiveX Control.
  4. In the Insert ActiveX Control dialog box,
    1. Select FarPoint Spread 8.0 (Unicode) or FarPoint 8.0 (OLEDB) from the ActiveX control list.
    2. Choose the OK button.
  5. Click the right mouse button in the dialog to display the pop-up menu.
  6. Choose ClassWizard.
  7. If you are creating a new dialog, create a C++ class for the dialog using the following steps:
    1. In the Adding a Class dialog box, choose the OK button.
    2. In the New Class dialog box under Class Information, type the new name in the Name box.
    3. Choose the OK button.
  8. Create a member variable for the control you inserted into your dialog using the following steps:
    1. In the MFC ClassWizard window on the Member Variables tab, select the control ID of the ActiveX control you added to the dialog from the Control IDs list.
    2. Choose the Add Variable button.
    3. Choose the OK button in the Microsoft Developer Studio message that explains that a class wrapper will be generated for you.
  9. In the Confirm Classes dialog box, you can modify the class name, the implementation file name, and the declaration header file name or accept the defaults provided.
  10. Choose the OK button.
  11. In the Add Member Variable dialog box, type a variable name in the Member variable name box, and then choose the OK button.
  12. Choose the OK button.

   ClassWizard generates a wrapper class to support the selected Spread control.

To generate a C++ wrapper with the control as an application component:

  1. In MSVC 6.0, from the Projects menu, choose Add to Project, Components and Controls.
  2. In the Components and Controls Gallery dialog box, choose the Registered ActiveX Controls folder.
  3. Select FarPoint Spread 8.0 or FarPoint Spread 8.0 (OLEDB) from the list.
  4. Choose the Insert button, then choose OK to insert the component.
  5. In the Confirm Classes dialog box,
    1. Modify the class name, the implementation file name, and the declaration header file name or accept the defaults provided.
    2. Choose the OK button.
  6. In the Components and Controls Gallery dialog box, choose the Close button.

    ClassWizard generates a wrapper class to support the selected Spread control.

 

 


Copyright © GrapeCity, inc. All rights reserved.