Project

General

Profile

Using OCX Controls in AppBuilder

A key point: OCX controls are only 32-bit in nature. It is my understanding that Microsoft has never provided a 64-bit development environment or APIs for creating 64-bit OCX controls. This naturally causes issues when using the newer 64-bit OpenEdge development tools.

The following notes describe how to configure and Windows OS machine to be able to launch the AppBuilder and work with the OCX controls:
  1. Install "Visual Studio 2017 Community", which will also install a design time license for MS common controls. Those OCX's require a license to be used at design time. There is only a 32-bit version of MS common controls OCX's. At least 'Desktop Development with C++' is needed. Reboot the machine after this is installed.
  2. create a command file with the following command (adjust as necessary) to launch the procedure editor in 32bit mode:
    C:\Progress\OE116_32\gui>prowin32.exe -cpstream UTF-8 -cpinternal UTF-8 -basekey "INI" -ininame progress.ini -p _edit.p 
    

    Change prowin32.exe path accordingly to your system.
    In progress.ini, ensure that adeuib.pl is in propath, which should look like this:
    DLC=C:\Progress\OE116_64
    EditorConfigPath=C:\Progress\OE116_64WRK\proedit
    PROPATH=@%DLC%\gui\ablunit.pl;%DLC%\gui\adecomm.pl;%DLC%\gui\adecomp.pl;%DLC%\gui\adedesk.pl;%DLC%\gui\adedict.pl;%DLC%\gui\adeedit.pl;%DLC%\gui\adeicon.pl;%DLC%\gui\aderes.pl;%DLC%\gui\adeshar.pl;%DLC%\gui\adeuib.pl;%DLC%\gui\adeweb.pl;%DLC%\gui\adexml.pl,%DLC%\gui\dataadmin.pl;%DLC%\gui\OpenEdge.BusinessLogic.pl;%DLC%\gui\OpenEdge.Core.pl;%DLC%\gui\OpenEdge.ServerAdmin.pl;%DLC%\gui\prodict.pl;%DLC%\gui\protools.pl;%DLC%,%DLC%\bin;.\PosseNet;.@.
    
  3. Run this command file and from the Procedure Editor menu, select menu Tools then AppBuilder.
  4. Open File, New and select a Window template.
  5. Add new OCX control on this form from the builder controls panel. It opens "Choose Control" dialog that lists all available installed (manually or auto) OCX controls. Select e.g. Miscosoft Date and Time Picker 6.0 (SP4). If it is not found, then check mscomct2.ocx library, it should be present in the windows system directory and it should be registered manually. My system has mscomct2.ocx in Windows\SysWow64\
    Regsvr32 [/s] mscomct2.ocx
    

Once you added an OCX control, inspect its properties by double-clicking on it, which will open a Property Editor page. All these properties will not appear in the 4GL source code, and will be configured in the associated .wrx file.