SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
The conversion is not automatic, but takes just a few minutes for a project.
Only a minimal conversion is required when upgrading from SftButton/OCX 2.5 to SftButton/OCX 3.0. SftButton/OCX 3.0 is virtually 100% source compatible with older releases of SftButton/OCX. Your application(s) must be recompiled to use SftButton/OCX 3.0. SftButton/OCX 3.0 and older versions of SftButton/OCX and SftBox/ATL can coexist on the same system and can be used in the same application.
Make sure to back up your current projects, before converting your projects. Please read the conversion process specific to your language carefully BEFORE converting your project. After converting, once the control saves updated property settings, you will not be able to return to SftButton/OCX 2.5.
Visual Basic
.NET (Managed Languages)
Visual C++ (Unmanaged C/C++)
Other Development Tools
After installing SftButton/OCX 3.0, all your projects will continue to use SftButton/OCX 2.5 until you make the following change in each project's main VBP (Visual Basic Project) file. Before opening the project file, make sure to close the project in Visual Basic, then edit the VBP file using a text editor and make the following changes:
Existing Project File (VPB File):
Type=Exe Form=Form1.frm Reference=*\G00020430-0000-0000-C000-000000000046#2.0#0#G:\WINNT\System32\stdole2.tlb#OLE Automation Object={20A526A0-DFFD-4dc4-99BE-1857E0507506}#2.5#0; SftButton_IX86_U_25.ocx IconForm="Form1" Startup="Form1" ExeName32="yourexe.exe" Command32="" Name="yourproject"
The line describing SftButton/OCX 2.5 (above, using a bold font) should be replaced with the following line:
Object={A65EEE90-0739-4116-8236-6DCAD56452B6}#3.0#0; SftButton_IX86_U_30.ocx
You can copy this line directly from this help file or copy it from the file "Upgrade.txt" which you can find in the SftButton/OCX product directory. The line must be copied as-is, without any modifications.
Existing Forms And Modules (FRM, BAS Files):
All forms and modules must be edited using a text editor. The following changes can easily be accomplished by a global edit and replace operation:
All references to "SftButtonLib25" must be replaced by "SftButtonLib30".
If you are upgrading from SftButton/ATL 1.5 or older: All references to "SftButtonLib.SftButton" must be replaced by "SftButtonLib30.SftButton" and all references to "SftButtonLib.DataObject" must be replaced by "SftButtonLib30.DataObject".
Once the VBP and FRM file have been saved, you can open the project in Visual Basic. Make sure to review each form (in design mode) and save it to complete the upgrade. The controls will save updated property settings, so you will not be able to return to SftButton/OCX 2.5. Once all forms have been saved, the project is using SftButton/OCX 3.0.
While most other languages offer a fairly easy conversion, .NET and its languages require a bit more effort, but in most cases is limited to the steps documented below.
Existing Forms (FRM Files):
Updating the forms to use SftButton/OCX 3.0 is quite straightforward:
The forms can now be opened and the project uses SftButton/OCX 3.0 exclusively. You will not be able to return to SftButton/OCX 2.5.
After installing SftButton/OCX 3.0, all your projects will continue to use SftButton/OCX 2.5 until you make the following change in each dialog resource that defines a SftButton/OCX control. Before opening the resource script (RC file), make sure to close the project in Visual C++, then edit the RC file using a text editor and make the following changes:
IDD_MFC_DIALOG DIALOGEX 0, 0, 320, 200 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_APPWINDOW CAPTION "MFC" FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "OK",IDOK,260,7,50,14 PUSHBUTTON "Cancel",IDCANCEL,260,23,50,14 CONTROL "",IDC_SFTBTN1,"{20A526A4-DFFD-4dc4-99BE-1857E0507506}", WS_TABSTOP,135,99,51,18 END
The contents of the line describing SftButton/OCX 2.5 (above, using a bold font) should be replaced with the following:
CONTROL "",IDC_SFTBTN1,"{A65EEE94-0739-4116-8236-6DCAD56452B6}",
Only change the ClassID (i.e., 20A526A4-DFFD-4dc4-99BE-1857E0507506), do not change the rest of the line.
You can copy this information directly from this help file or copy it from the file "Upgrade.txt" which you can find in the SftButton/OCX product directory. The ClassID must be copied as-is, without any modifications.
Once the RC file has been saved, you can open the project in Visual C++ and the project is now using SftButton/OCX 3.0. The controls will save updated property settings, so you will not be able to return to SftButton/OCX 2.5.
Make sure to change ALL occurrences of SftButton/OCX to version 2.5, otherwise you will not be able to open the resource script (RC file).
The #import statement used with SftButton/OCX 2.5 must be replaced with an #import statement for the new version:
Version 2.5:
#pragma warning(disable : 4192) // automatically excluding 'Ixxx' while importing type library 'stdole2.tlb' // For information about the following construct, please see Microsoft's // KnowledgeBase entry Q224610 #import <stdole2.tlb> rename_namespace("SftButtonNameSpace") exclude("OLE_HANDLE", \ "OLE_COLOR", "IFontDisp", "IPictureDisp", "FONTSIZE") #import <SftButton_IX86_U_25.ocx> rename_namespace("SftButtonNameSpace") rename("LoadImage", "LoadImageSftButton") #if _MSC_VER >= 1400 // need at least Visual Studio 2005 # pragma comment(lib, "comsuppw.lib") // avoid link error in VS2005 #endif #pragma warning(default : 4192) using namespace SftButtonNameSpace;
New for SftButton/OCX 3.0:
#pragma warning(disable : 4192) // automatically excluding 'Ixxx' while importing type library 'stdole2.tlb' // For information about the following construct, please see Microsoft's // KnowledgeBase entry Q224610 #import <stdole2.tlb> rename_namespace("SftButtonNameSpace") exclude("OLE_HANDLE", \ "OLE_COLOR", "IFontDisp", "IPictureDisp", "FONTSIZE") #import <SftButton_IX86_U_30.ocx> rename_namespace("SftButtonNameSpace") rename("LoadImage", "LoadImageSftButton") #if _MSC_VER >= 1400 // need at least Visual Studio 2005 # pragma comment(lib, "comsuppw.lib") // avoid link error in VS2005 #endif #pragma warning(default : 4192) using namespace SftButtonNameSpace;</font>
Most development tools allow access to the ClassID used for controls on a form or dialog. Sometimes this may be accomplished by using a text editor and editing a configuration file, or possibly the development tool allows direct modification of the ClassID.
Generally, the ClassID used for the prior release 20A526A0-DFFD-4dc4-99BE-1857E0507506 must be replaced with the new ClassID A65EEE90-0739-4116-8236-6DCAD56452B6. Once this step is completed, opening the project is sufficient to allow SftButton/OCX to convert the stored property settings.
For specific instructions or help, please see your development tool's documentation.