Problem:
The use of 3D objects (radio buttons etc.) in Dialog System 2.5 and later has caused confusion with some of our Customers. This article documents how the 3D support in Panels 2 works and what code is required in your Micro Focus COBOL/Dialog System applications.
We will be looking at the following Micro Focus products:
Workbench/Object COBOL 3.4 (16 bit).
Dialog System 2.5 (16 bit).
Workbench/Object COBOL 4.0 (32 bit).
Dialog System 2.5 (32 bit).
Net Express 2.0 with Dialog System 3.0 (32 bit).
Resolution:
The following notes are split by operating system and then by Micro Focus product. The information is presented in the form of bulleted items so that it can be used as a checklist in the event of problems.
[General Points of Interest]
Panels 2 (16 bit) uses a DLL written by Microsoft called CTL3DV2.DLL or CTL3D.DLL. These are available from the Microsoft web site. There is also a 32 bit DLL available from Microsoft called CTL3D32.DLL. 32 bit Panels 2 does not require this if running on Windows 95 or NT 4.0. Panels 2 looks for CTL3DV2.DLL first followed by CTL3D.DLL. Only one of the DLLs is required. No application error is generated if 3D support cannot be initialised. On Windows 95 native 3D look and feel is used.
[Microsoft Windows 3.1x and Workgroups]
Micro Focus 3.4/2.5 16 bit Products.
The 3D support is dependent on the Microsoft CTL3DV2 and CTL3D DLLs. The CTL3D DLLs should be installed in the WINDOWS\\SYSTEM directory. Version 2.04 or later of the CTL3D DLLs is required.
Panels 2 looks for CTL3DV2.DLL before CTL3D.DLL, i.e., only one is required. Panels 2 does not load the 3D support DLLs by default. The Dialog System 2.5 development tool will attempt to use 3D objects by default. The Workbench and Animator 2 tools run in 2D mode by default. This can be altered by setting the MFP23D=ON environment variable prior to loading Windows. The 2D/3D mode is global to a Windows 3.1x process. Dialog System applications require 3D initialization code (see later section) to display 3D objects at runtime. If the application is being animated then the MFP23D=ON environment variable needs to be set before loading Animator 2.
N.B. The Micro Focus 32 bit products cannot be run on Windows 3.1x and Workgroups.
[Microsoft Windows 95]
Micro Focus 3.4/2.5 16 bit Products.
The Dialog System 2.5 development tool will attempt to use 3D objects by default.
The Workbench and Animator 2 tools run in 2D mode by default. This can be altered by setting the MFP23D=ON environment variable prior to loading Windows. Panels 2 uses native Windows 95 objects by default. Most of the objects are 2D but certain objects (check boxes, radio buttons) are 3D. No CTL3DV2.DLL or CTL3D.DLL is required. The 2D/3D mode is local to a Panels 2 session. This means Animator 2 can be running in 2D while a Dialog System application that is being animated can be displayed in 3D. Dialog System applications require 3D initialization code (see later section) to display 3D objects at runtime. The MFP23D=ON environment variable is not required.
Micro Focus 4.0/2.5 32 bit Products.
Workbench runs in 2D by default. Animator 2 runs in 3D by default. No CTL3D32.DLL is required.
The 2D/3D mode is local to each Panels 2 session. Dialog System applications require 3D initialization code (see later section) to display 3D objects at runtime. The MFP23D=ON environment variable is not required. Setting MFP23D=ON causes Workbench to run in native 3D mode. This will also force Dialog screensets to be displayed in native 3D even if they are not using DS-Use-3D-Controls.
Micro Focus Net Express 2.0 32 bit Products.
Net Express 2.0 IDE does not use Panels 2. No CTL3D32.DLL is required.
Dialog applications do not need the DS-Use-3D-Controls call. Inclusion will not cause problems and is required for backward source code portability. MFP23D=ON has no meaning with Dialog System applications because the Dialog System runtime uses 3D by default. The Dialog System development tool runs in native 3D mode. It is possible to alter the 2D/3D attribute of an object via the Dialog System DSOBJCFG program.
[Microsoft Windows NT 4.0]
Micro Focus 3.4/2.5 16 bit Products.
Panels 2 is unable to detect Windows NT 4.0 so native objects are not used. Therefore the 3D support is dependent on the Microsoft CTL3DV2 and CTL3D DLLs. The CTL3D DLLs should be installed in to the WINNT\\SYSTEM folder. Version 2.04 or later of the CTL3D DLLs is required. Panels 2 looks for CTL3DV2.DLL before CTL3D.DLL, i.e., only one is required. Panels 2 does not load the 3D support DLLs by default. The Dialog System 2.5 development tool will attempt to use 3D objects by default. The Workbench and Animator 2 tools run in 2D mode by default. This can be altered by setting the MFP23D=ON environment variable prior to loading Windows. Dialog System applications require 3D initialization code (see later section) to display 3D objects at runtime. If the application is being animated then the MFP23D=ON environment variable must be set before loading Animator 2.
Micro Focus 4.0/2.5 32 bit Products.
Workbench runs in 2D by default. Animator 2 runs in 3D by default. No CTL3D32.DLL is required.
The 2D/3D mode is local to each Panels 2 session. Dialog System applications require 3D initialization code (see later section) to display 3D objects at runtime. The MFP23D=ON environment variable is not required. Setting MFP23D=ON causes Workbench to run in native 3D mode. This will also force Dialog screensets to be displayed in native 3D even if they are not using DS-Use-3D-Controls.
Micro Focus Net Express 2.0 32 bit Products
Net Express 2.0 IDE does not use Panels 2. No CTL3D32.DLL is required.
Dialog applications do not need the DS-Use-3D-Controls call. Inclusion will not cause problems and is required for backward source code portability. MFP23D=ON has no meaning with Dialog System applications since the Dialog System runtime uses 3D by default. The Dialog System development tool runs in native 3D mode. It is possible to alter the 2D/3D attribute of an object via the Dialog System DSOBJCFG program. Dialog System 3D Initialization Code. Part of Dialog System initialization routine:
INITIALIZE Data-Block.
*>remainder of initialization code
MOVE "TEST1" TO DS-Set-Name.
MOVE DS-Use-3D-Controls TO DS-Control.
This call will return from Dialog System without performing any Dialog code or displaying anything on the desktop. It simply attempts to perform 3D initialization.
CALL "DSGRUN" USING ...
MOVE DS-New-Set TO DS-Control.
CALL "DSGRUN" USING ...
If your Windows environment is configured correctly (see above) then you should see your Dialog System screenset displayed in glorious 3D.
