HomeSign in to retrieve your license keys and installation information.
 

 

  .NET Controls     ActiveX Controls     DLL Controls     Order     Support     About Us  
 
 

Using OCX Installer With C/C++ (Unmanaged)

Overview | Documentation | C# | VB.NET | VB6 | C/C++ | Download

You application calls OCX Installer during application initialization, usually in WinMain or CWinApp::InitInstance:

if (!OCXInstaller_ProcessFile(TRUE, "TestApp_CPP", "Softel vdm, Inc.", 
".\\SftTree_IX86_U_60.ocx", "%WinSys", TRUE, FALSE)) return FALSE;

In the source file containing WinMain or CWinApp::InitInstance, add the following #include statement:

#include "OCXInstaller.h" 

Your project settings must be modified to search the directory containing the above header file:

VC6: Project, Settings menu command, click on the C/C++ tab, select Preprocessor in the Category combo box, then add the include directory to the Additional include directories text box. The usual path is \Program Files\Softelvdm\OCX Installer\Include.

VS 2003, 2005, 2008: Project, Properties menu command, click on the C/C++, General category (in Configuration Properties), then add the include directory to the Additional Include Directories text box. The usual path is \Program Files\Softelvdm\OCX Installer\Include.

Make sure to update Debug and Release settings.

The application must be linked with OCXInstaller.lib, which is located at \Program Files\Softelvdm\OCX Installer\Dll:

VC6: Project, Add To Project menu command, select Files.... Locate \Program Files\Softelvdm\OCX Installer\Dll\OCXInstaller.lib and add it.

VS 2003, 2005, 2008: Project, Add Existing Item... menu command, locate \Program Files\Softelvdm\OCX Installer\Dll\OCXInstaller.lib and add it.

Make sure to update Debug and Release settings.

In order to debug/execute your application, make sure to copy the OCXInstaller.Dll and all other required files (OCXes) to the folder containing your executable.

Also, your debugger settings need to updated to set the working directory to the directory where your application executable is located.

VC6: Project, Settings menu command, click on the Debug tab, select General in the Category combo box and update the Working directory.

VS 2003, 2005, 2008: Project, Properties menu command, click on the Debugging category (in Configuration Properties) and update the Working Directory.

Make sure to update Debug and Release settings.

Sample

OCX Installer includes a complete C++/MFC sample including project files for Visual Studio 6, 2003, 2005, 2008 at

\Program Files\Softelvdm\OCX Installer\Samples\Sample_CPP

The completed, precompiled and distributable sample is located in the XCOPY subfolder. During compilation, the executable and all required files are copied into the XCOPY subfolder.

Home

 

.NET Controls

SftTree/NET 2.0

SftTabs/NET 6.0

 

ActiveX Controls

SftTree/OCX 6.0

SftTabs/OCX 6.0

SftBox/OCX 4.5

SftButton/OCX 2.5

SftDirectory 2.5

SftMask/OCX 6.5

SftOptions 1.0

SftPrintPreview/OCX 1.0

OCXInstaller

 

DLL Controls

SftTree/DLL 6.0

SftTabs/DLL 5.0

SftPrintPreview/DLL 1.0

 

Customer Info

My Account Login Required

License Keys Login Required

Download Products Login Required

Order Now

About Ordering

Frequently Asked Questions