Spread 8 ReadMe
Spread 6.0 ADO ActiveX Control to Spread 8.0 Unicode ADO ActiveX Control

If you formerly used the Spread version 6.0 ADO ActiveX control and now want to use the Spread version 8.0 Unicode ADO ActiveX control, complete the following steps.

Note: Back up your project before making any changes.
  1. Open your existing project.
  2. Delete the .CLW file for your project. The ClassWizard will regenerate this file when it cannot find it. This step is necessary to force the wrapper classes to be regenerated.
    1. If you used a resource editor to put a Spread and SpreadPreview control on a dialog, open the .RC file as text in a text editor and make the following changes:

      For the Spread control...

      Change:
      {41F841C0-AE16-11D5-8817-0050DA6EF5E5}
      
      To:
      {DE52502E-F837-492B-AE14-A182531AFAF4}
      
    2. For the SpreadPreview control...

      Change:
      {41F841C6-AE16-11D5-8817-0050DA6EF5E5}
      
      To:
      {6C30120B-5FF5-4352-8873-B8B2366348C2}
      
  3. Open the ClassWizard and allow it to regenerate the .CLW file based on the files in your project.
  4. Use the ClassWizard tool to change the class for each member variable for the Spread control. Remove the variable and re-add it, using the same name. ClassWizard will regenerate the wrapper classes for the new ActiveX control the first time an instance of the control is mapped to a member variable.
  5. After generating new wrappers, do one of the following:
    • Update your project code to change the properties listed in Obsolete Properties.
    • Add the following declarations to your new wrappers (the default wrapper names are spreadsheet.h and spreadsheet.cpp):
    Add to spreadsheet.h:
    long GetColHeaderDisplay();
    void SetColHeaderDisplay(long);
    BOOL GetDisplayColHeaders();
    void SetDisplayColHeaders(BOOL);
    long GetRowHeaderDisplay();
    void SetRowHeaderDisplay(long);
    BOOL GetDisplayRowHeaders();
    void SetDisplayRowHeaders(BOOL);
    
    Add to spreadsheet.cpp:
    long CSpreadSheet::GetColHeaderDisplay()
    {
    long result;
    GetProperty(0x18, VT_I4, (void*)&result);
    return result;
    }
    
    void CSpreadSheet::SetColHeaderDisplay(long propVal)
    {
    SetProperty(0x18, VT_I4, propVal);
    }
                    
    BOOL CSpreadSheet::GetDisplayColHeaders()
    {
    BOOL result;
    GetProperty(0x2c, VT_BOOL, (void*)&result);
    return result;
    }
    
    void CSpreadSheet::SetDisplayColHeaders(BOOL propVal)
    {
    SetProperty(0x2c, VT_BOOL, propVal);
    }
    
    long CSpreadSheet::GetRowHeaderDisplay()
    
    {
    long result;
    GetProperty(0x68, VT_I4, (void*)&result);
    return result;
    }
    
    void CSpreadSheet::SetRowHeaderDisplay(long propVal)
    {
    SetProperty(0x68, VT_I4, propVal);
    }
    
    BOOL CSpreadSheet::GetDisplayRowHeaders()
    {
    BOOL result;
    GetProperty(0x2d, VT_BOOL, (void*)&result);
    return result;
    }
    
    void CSpreadSheet::SetDisplayRowHeaders(BOOL propVal)
    {
    SetProperty(0x2d, VT_BOOL, propVal);
    }
    
  6. Review the changes in Changes to Spread ActiveX Components and update your project as needed.
  7. Rebuild your project and run it.

 

 


Copyright © GrapeCity, inc. All rights reserved.