Mini Repository for Windows Software – Dialog – Simple User Interface

Dialog is a program that lets you create simple user interfaces quickly and easily.
Many of the install programs on Linux use Dialog to communicate with the person installing the operating system. Now you can use Dialog on Windows to rapidly create interfaces as well.

Scripting languages are great for prototyping applications or gluing programs together. However, most scripting languages don’t offer simple ways to communicate with a user and ask a question or display information. Dialog can bridge the user interface gap. It can help you create dialog boxes to display menu lists, checkbox lists, radio lists, input boxes for users to enter information, password boxes, a calendar for choosing dates or a way to choose times. It can give users yes and no button choices or display other text information to the user.

Dialog isn’t the only simple user interface program out there, but it’s been around a long time and is probably the most commonly used. Some other programs are whiptail, zenity, gxmessage, gtkdialog and kdialog. There are also several different variants based on dialog including xdialog, cdialog and gdialog. When I ported Dialog to Windows I wasn’t aware of any versions of programs like these available for Windows. I tried to find the latest version of Dialog source code I could and that ended up coming from a Ubuntu package. Dialog wouldn’t compile as is, so I commented out a few things that wouldn’t work. Most of the functionality of the original Dialog program is available on Windows, but there are a few options such as file selection that are not currently available.

Dialog uses PDCurses to render its user interface which means it works in console mode. This is usually an advantage when scripting. After I’d built Dialog and been using it for a while, I found out someone has ported Zenity to Windows. It uses GTK+ 2, so if you prefer more of a Windows look and feel, you might want to check it out. I was also able to get gxmessage to build using MinGW and msys. I was also able to build XDialog with MinGW and msys. It works just like Dialog, but uses GTK for the interface. It also needs several GTK dlls just to run.

Here’s the Windows version of Dialog. It’s offered strictly as is with no guarantees, warranties or support of any kind. I use this program myself on my own computer and at work, but in other words, use at your own risk.

You can download a copy of Dialog for Windows from here.

To meet the licensing conditions for distributing Open Source software under a GNU license, one needs to make the source that created the program available and let users know how to build the program themselves if they care to.

You can download PDCurses from here:
http://criticalpressmedia.com/wp-content/uploads/pdcurs34.zip

For more information on PDCurses, a wonderful cross-platform user interface library that works on a wide variety of systems, please see:
http://pdcurses.sourceforge.net/

You can download Dialog source code from here:
http://criticalpressmedia.com/wp-content/uploads/dialog_1.1-20080819.orig.tar.gz

My patches and flags used to compile and build are listed here:
http://www.distasis.com/cpp/patches.htm#dialog

I’ve use Open Watcom as my C/C++ compiler when building this particular project. You can get a free copy from http://www.openwatcom.org/index.php/Main_Page. I’ve also used msys from the MinGW project to set up a useful environment for my compiler. Msys is available from http://www.mingw.org.

Go ahead and try Dialog with some of your own scripts or command line applications. It may make it much easier to communicate with your end user even if that end user is you.

Last 5 posts by Winston Crutchfield