My experience with SmartWin++, the free standard C++ Win32 GUI library 

Introduction

I have done C++ GUI programming with SmartWin++ for around a year. These comments are aimed at explaining what I did, and why I like SmartWin++.

Perhaps I will start by explaining how I was introduced to SmartWin++. I was on a 2 week business trip and as I left on Friday night late, I thought, I'll just leave my laptop at the office and come in tomorrow. But my badge did not work on the weekend. So I was stranded for two days without any computer. I went to the bookstore and ended up buying and reading Andrei Alexandrescu's Modern C++ Design. I was aware of some of the advanced C++ abilities before from reading Stroustrup, but had not actually done any template based C++ programming myself. My initial efforts using templates were useful.

Later, I happened to be looking for a C++ GUI. My immediate need were for windows, although a cross platform GUI toolkit would have been ideal. 

Why not Java ?  Well Java Swing is ok, but I wanted to make small low latency utilities that used Win32 APIs, and not spend a lot of time with JNI.

I had tried QT some, read most of C++ GUI, Programming with Qt 3.0 by Blanchette & Summerfield, but could not justify the commercial programming license fee for Windows and Linux of $ 2,490. One wants to use the same GUI for work as well as outside activities. And just because I start using a tool, its difficult to get the company to buy a copy for the other programmers so they can also use my sourcecode. QT also does not assume a Standard C++ compiler, so they limited the use of its features. background on Standard C++

I also did MFC GUI programming, but never felt comfortable. All this thrashing about to get data back and forth between the controls and variables. The syntax was clumsy. But I digress. This is supposed to be about SmartWin++.

After searching for "c++ gui free library", I looked at www.thefreecountry.com/sourcecode/gui.shtml Then I looked at SmartWin++ and liked the message and the samples. It was simple. It was using the techniques described in Modern C++ Design.   I thought I would give it a try.

So what happened then ?

I wrote some programs that used it and then progressivly became more involved.  I added some new functionality to SmartWin+ in the areas of Widget layout and IO support routines.

The sw_mdi program 

Here is a sample SmartWin++ program called sw_mdi.exe 544KB

It is an multiple document interface type program that supports four document formats: ascii text, grid data in a html table, tree based data, and .emf graphics.

The main window lets the user create multiple copies of the four window types and arrange them with menu commands. If the main window is resized, then the child windows are resized accordingly. If a new client window is added, then the rest are shrunk to make space for the new window. Each child window also has a menu either with a right click or with a dedicated [menu] button. The three data types are:

I tried to improve on the dialog in the SmartWinUnitTest Notepad with an attempt at a child window which will allow the user to enter a vector of strings given prompts. It is used for the ftp parameters and the input of a search string. However, I would like to make it behave more like a dialog without using static positioning with a resource editor.

Stay tuned for more later .....