Spread 8 ReadMe
Spread 3.0 DAO ActiveX Control to Spread 8.0 Unicode ADO ActiveX Control

If you formerly used the Spread version 3.0 DAO 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:
      {E2454650-4D87-11D2-B8B2-0000C00A958C}
      
      To:
      {DE52502E-F837-492B-AE14-A182531AFAF4}
      
    2. For the SpreadPreview control...

      Change:
      {664E2200-24DB-11D2-9A82-444553540000}
      
      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 GetAction();
    void SetAction(long);
    unsigned long GetCellBorderColor();
    void SetCellBorderColor(unsigned long);
    long GetCellBorderStyle();
    void SetCellBorderStyle(long);
    short GetCellBorderType();
    void SetCellBorderType(short);
    long GetDestCol();
    void SetDestCol(long);
    long GetDestRow();
    void SetDestRow(long);
    long GetMultiSelCount();
    void SetMultiSelCount(long);
    long GetMultiSelIndex();
    void SetMultiSelIndex(long);
    long GetPosition();
    void SetPosition(long);
    long GetSelModeSelCount();
    void SetSelModeSelCount(long);
    long GetSortBy();
    void SetSortBy(long);
    
    Add to spreadsheet.cpp:
    long CSpreadSheet::GetAction()
    {       
    long result;    
    GetProperty(0x1, VT_I4, (void*)&result);    
    return result;
    }
    
    void CSpreadSheet::SetAction(long propVal)
    {
    SetProperty(0x1, VT_I4, propVal);
    }
    
    unsigned long CSpreadSheet::GetCellBorderColor()
    {
    unsigned long result;   
    GetProperty(0xf, VT_I4, (void*)&result);
    return result;
    }
    
    void CSpreadSheet::SetCellBorderColor(unsigned long propVal)
    {       
    SetProperty(0xf, VT_I4, propVal);
    }
    
    long CSpreadSheet::GetCellBorderStyle()
    
    {
    long result;
    GetProperty(0x10, VT_I4, (void*)&result);
    return result;
    }
    
    void CSpreadSheet::SetCellBorderStyle(long propVal)
    {
    SetProperty(0x10, VT_I4, propVal);
    }
    
    short CSpreadSheet::GetCellBorderType()
    {
    short result;
    GetProperty(0x11, VT_I2, (void*)&result);
    return result;
    }
    
    void CSpreadSheet::SetCellBorderType(short propVal)
    {
    SetProperty(0x11, VT_I2, propVal);
    }
    
    long CSpreadSheet::GetDestCol()
    {
    long result;
    GetProperty(0x29, VT_I4, (void*)&result);
    
    return result;
    }
    
    void CSpreadSheet::SetDestCol(long propVal)
    {
    SetProperty(0x29, VT_I4, propVal);
    }
            
    long CSpreadSheet::GetDestRow()
    {
    long result;
    GetProperty(0x2a, VT_I4, (void*)&result);
    return result;
    }
    
    void CSpreadSheet::SetDestRow(long propVal)
    {
    SetProperty(0x2a, VT_I4, propVal);
    }
    
    long CSpreadSheet::GetMultiSelCount()
    {
    long result;
    GetProperty(0x48, VT_I4, (void*)&result);
    return result;
    }
    
    void CSpreadSheet::SetMultiSelCount(long propVal)
    
    {
    SetProperty(0x48, VT_I4, propVal);
    }
    
    long CSpreadSheet::GetMultiSelIndex()
    {
    long result;
    GetProperty(0x49, VT_I4, (void*)&result);
    return result;
    }
    
    void CSpreadSheet::SetMultiSelIndex(long propVal)
    {
    SetProperty(0x49, VT_I4, propVal);
    }
    
    long CSpreadSheet::GetPosition()
    {
    long result;
    GetProperty(0x4d, VT_I4, (void*)&result);
    return result;
    }
    
    void CSpreadSheet::SetPosition(long propVal)
    {
    SetProperty(0x4d, VT_I4, propVal);
    }
    
    long CSpreadSheet::GetSelModeSelCount()
    
    {
    long result;
    GetProperty(0x77, VT_I4, (void*)&result);
    return result;
    }
    
    void CSpreadSheet::SetSelModeSelCount(long propVal)
    {
    SetProperty(0x77, VT_I4, propVal);
    }
    
    long CSpreadSheet::GetSortBy()
    {
    long result;
    GetProperty(0x7e, VT_I4, (void*)&result);
    return result;
    }
    
    void CSpreadSheet::SetSortBy(long propVal)
    {
    SetProperty(0x7e, VT_I4, propVal);
    }
    
  6. Review the changes in Changes to Spread ActiveX Components and update your project to replace Obsolete Properties.
  7. Rebuild your project and run it.

 

 


Copyright © GrapeCity, inc. All rights reserved.