Problem:
This demo shows how to swap the focus from a Dialog System window to a COBOL text window.
Resolution:
INTRODUCTION
==========
This demo shows how to swap the focus from a Dialog System window to the COBOL text window. This is important when you have an application which is made up from a mixture of GUI and character forms.
SOURCE FILES:
==========
Program Files Description
---------------- -----------------------------------------------------------
TEST1.CBL Main program which calls Dialog System.
SPROG1.CBL Example sub-program 1.
SPROG2.CBL Example sub-program 2.
TEST1.GS Dialog System screenset.
Copy Files:
---------------- -----------------------------------------------------------
TEST1.CPB Dialog System DataBlock copybook.
OPERATION:
==========
Load the SWAPFOCUS.APP file in to Net Express and rebuild the project. You can then run or animate the demo, starting at TEST1.INT.
Please note, due to the way that the IDE works you need to run the example outside of the IDE to see the full effect. This can be done by opening a Net Express command prompt (Start, Programs, Micro Focus Net Express 3.1, Net Express Command Prompt) and entering the following from the project folder.
runw debug\\test1.int
You will see a small Dialog System window with three push buttons on it. The first two load COBOL sub-programs which display their output in a COBOL text window. The sub-programs wait for you to press ENTER before terminating. When you do this, the text window is hidden and focus is returned to Dialog System.
The source code is documented and explains why each of the APIs is used.
REFERENCES
========
See the Microsoft Windows SDK for full details on the API calls used.
NOTE:
====
The COBOL text window is hidden rather than closed to avoid the COBOL runtime closing down and the process terminating.
==========================================================
Keywords: demonstration, sample, example, demo, Dialog System, swapfocus.zip
demo.ex
demo.ne