Programming in Windows GUI with OpenCOBOL?

I am completely new to COBOL, but I would like to take a look at the various GUI programming options in Windows. I do not really like Tcl / Tk. Is there any resource for developing a Windows GUI in COBOL in the same way as in a GUI in C?

Thanks!

+4
source share
3 answers

I used MicroFocus version 2.0 and supported the creation of Windows GUI forms using an event driven model. Now they are version 5.1. Although the full version is quite expensive, there is a book with a stripped down educational version:

http://www.murach.com/books/mcb2/microfocus.htm

+2
source

For OpenCOBOL, there is a built-in Tcl / Tk layer from Rildo Pragana (author of TinyCOBOL, its TC Tcl / Tk sample compiled and linked for OpenCOBOL, try it first), but if you don't like Tcl / Tk, its toolkit places almost the entire GUI on the Tk side , so:

  • There is also a sample GTK + layer

GTK + from OpenCOBOL, including callbacks

The source code is as follows:

*> Add a text entry field CALL "CBL_OC_GTK_ENTRY_NEW" returning gtk-textentry END-CALL *> Connect code to the text entry, passing the entry widget SET callback TO ENTRY "CBL_OC_activate" CALL "CBL_OC_G_SIGNAL_CONNECT" using by value gtk-textentry by reference "activate" & x"00" by value callback by value gtk-textentry END-CALL ... *> window is ready to show CALL "CBL_OC_GTK_WIDGET_SHOW" using by value gtk-window END-CALL *> Start up the event loop, control returned when GTK main exits CALL "CBL_OC_GTK_MAIN" END-CALL *> Something terminated the GTK main loop, sys-close or bye or display "ending..." end-display 
  • FLTK worked, but I did not publish the source code of the samples.
  • GtkHTML widgets also worked.
  • Gambas COBOL GUI Level Hosted by Google Code
  • ROOT / CINT can interpret OpenCOBOL generated C, and then you can get interactive graphs from WORKING-STORAGE.
  • Qt is well-tested, but in C ++ it requires more, albeit a thin, wrapping source, so GTK was targeted instead.

Quite a lot that can be wrapped by C can be called OpenCOBOL. This includes Microsoft's own WinAPI.

While working with the FAQ, I found that using Vala really opens up a field for the COBOL extension. Since both OpenCOBOL and Vala produce intermediate C, the mixing potential is almost unlimited, and developers can benefit from the efforts of any project. I recommend checking Vala for use with COBOL.

See the OpenCOBOL Frequently Asked Questions section, Section 5 for working samples. Screenshots from the source code listed at http://opencobol.add1tocobol.com/#does-opencobol-support-the-gimp-toolkit-gtk

+1
source

All Articles