使用 OpenCOBOL 进行 Windows GUI 编程?
我对 COBOL 完全陌生,但我想看看 Windows 上 GUI 编程的不同选项。 不过,我不太喜欢 Tcl/Tk。 是否有一些资源可以用 COBOL 开发 Windows GUI,就像用 C 开发 GUI 一样?
谢谢!
I'm completely new to COBOL, but I'd like to take a look at the different options for GUI programming on Windows. I don't really like Tcl/Tk, though. Is there some resource for developing a Windows GUI in COBOL in the same manner that one would develop a GUI in C?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我使用了 MicroFocus 2.0 版,它支持使用事件驱动模型创建 Windows GUI 表单。 他们现在的版本是 5.1。 虽然完整版相当昂贵,但这里有一本精简学习版的书:
http://www.murach.com/books/mcb2/microfocus.htm
I used MicroFocus version 2.0 and it supported creating Windows GUI forms with an event driven model. They are now on version 5.1. Although the full version is quite expensive, there is a book with a stripped down learning version here:
http://www.murach.com/books/mcb2/microfocus.htm
查看 http://www.netcobol.com/
特别是 http://www.netcobol.com/products/windows/cobol.htm
check out http://www.netcobol.com/
in particular http://www.netcobol.com/products/windows/cobol.htm
对于 OpenCOBOL,Rildo Pragana 有一个嵌入式 Tcl/Tk 层(TinyCOBOL 的作者,他为 OpenCOBOL 编译和链接的 TC Tcl/Tk 示例,请首先尝试),但如果您不喜欢 Tcl /Tk,他的工具包几乎把所有的 GUI 都放在了 Tk 端,所以:
源代码如下所示:
几乎任何可以由 C 封装的东西都可以由 OpenCOBOL 调用。 其中包括本机 Microsoft WinAPI。
在处理常见问题解答时,我发现使用 Vala 确实开辟了扩展 COBOL 的领域。 由于 OpenCOBOL 和 Vala 都生产中间 C,因此混合潜力几乎是无限的,开发人员可以从任一项目的努力中受益。 我建议从 COBOL 中查看 Vala 的使用情况。
有关工作示例,请参阅 OpenCOBOL 常见问题解答第 5 部分。 http://opencobol 中列出的源代码的屏幕截图图像.add1tocobol.com/#does-opencobol-support-the-gimp-toolkit-gtk
For OpenCOBOL, there is an embedded Tcl/Tk layer by Rildo Pragana (author of TinyCOBOL, his TC Tcl/Tk sample compiled and linked for OpenCOBOL, first try), but if you don't like Tcl/Tk, his toolkit places almost all of the GUI on the Tk side, so:
Source code looking like:
Pretty much anything that can be wrapped by C, can be called by OpenCOBOL. That includes the native Microsoft WinAPI.
While working on the FAQ I found that using Vala really opens up the field for extending COBOL. As both OpenCOBOL and Vala produce intermediate C, the mixing potential is nearly unlimited, and developers can benefit from efforts by either project. I recommend checking out Vala for use from COBOL.
See the OpenCOBOL FAQ, section 5 for working samples. Screen capture image from source code listed at http://opencobol.add1tocobol.com/#does-opencobol-support-the-gimp-toolkit-gtk