Problem:
Net Express 4.0
How to set the font size of a COBOL Text Window that has the System menu disabled:
Scenario - a character-based program that is built with the graphical link option
(cbllink -G), but has disabled the System menu, that allows you to set the font and size,
by way of a call to the Win32 API SetWindowLong function. When this program is deployed
to other machines, the user won't be able to select the System menu to set the font size.
Resolution:
The solution here is to enable the System menu by commenting out the call to SetWindowLong and then rebuild and run the program.
Now, you should be able to select the System menu (in the upper left) of the COBOL Text Window, select the "Font Size..." menu, and select a font and size. Then select the "Settings..." menu and check on "Save font size on exit". Stop the program and run the Windows regedit.exe utility. The font settings will have been saved to HKEY_CURRENT_USER\\Software\\Micro Focus\\NetExpress\\2.0\\Apps where you'll see the program name with a Text Window key below that, and when selected should have an Options name and value.
Select the program name key/folder, then choose the "File" menu in regedit to export these
values to a .reg file. You can then rebuild the program with the System menu disabled and
deploy it to a machine where you will need to register the entries in the .reg file you
exported so that they exist on this machine. The program should then use the font and size
that you intended without any user interaction.