views:

785

answers:

6

I've got a project with a rather messy VCL codebase built on Borland C++ Builder 6. I intend to rewrite most parts of it since it's hardly maintainable in it's current state. I'm looking for a good and free alternative to VCL. It is a Windows-only closed source commercial project.

So main requirements are:

  1. Free for commercial closed-source projects
  2. Manage Windows GUI. Other components (db links and stuff) not required
  3. Be extendible (so one could write my own GUI components based on existing ones)
  4. Be STL-friendly.

Please post your suggestions, with pros and cons if possible.

== EDIT ==

Thanks for all the answers. I've decided to go with Qt as it has some other nice features like Qt Linguist translation suite.

+1  A: 

What you need may be the free version of BCB: Turbo C++ Explorer, or try .NET CLR / WinForms.

WxWidgets is simply a GUI library. Qt is a platform, but still far from a RAD framework like VCL. The only competitive is MFC, and unfortunately it's not free. In some point of view, .NET+CLR is the successor of VCL - well, maybe you can also try that - if you don't mind it requires the huge .NET framework.

If you just want a "good and free solution" and don't mind sticking with VCL, use TC++Exp.

Francis
Sorry, but how is this a VCL alternative, as the question clearly states?
mghie
Actually I intend to get rid of VCL in the project in favor of some other GUI library. Still, thanks for pointing out Turbo C++ Explorer, I'll check it out.
frgtn
TC++ supports VCL, so there's no need for an "alternative" - you can simply use it!
Francis
@Francis: Please read the question again and then your answer - aren't you noticing that there was nothing asked but a GUI library alternative to the VCL, in C++, while you try to sell a RAD framework: either the VCL, and failing that the whole .NET platform? What happened to answering the question instead of riding your own hobby horse?
mghie
Don't start fighting please. I've considered continuing with VCL in case moving to another library/framework turns out to be too expensive or too difficult for other developers in my team. I'll keep TC++Exp in mind if that happens to be the case.
frgtn
People living in real world should know how expensive it is to switch a framework, that's why I suggest a free version of same framework. Maybe the project seems simply require a GUI library at first, but since the previous one was RAD, there's big chance that eventually you'll find what you need as replacement is far more than a GUI library. I've seen too many times people underestimate the effort to drop MFC, and that's why I raised my suggestions
Francis
Sorry, I didn't mean to sound inflammatory. But I'm for answering the question. Sure one should be aware of the costs of switching GUI libraries or frameworks. Hopefully the math has already been done on that; staying with a seldomly used (in C++) GUI library might be very expensive as well. Anyway, what really got me was the tip to go for .NET - how would that be a less expensive switch from the VCL? Especially as C++ wouldn't be the first choice there, so that's probably a language switch as well?
mghie
BTW: wxWidgets isn't simply a GUI library, there's a lot of low-level stuff as well, usable in command line applications. File system access, multi-threading, container classes and so on. But for much of this going with the STL or boost libraries would probably be much better.
mghie
Someone else is also suggesting C++ Builder 2009! Why don't you go blame him? Why isn't .NET also a solution? You can still use C++ with it. I include it because it has the maximum coverage, and you can use it for free (although it's not open source) with VC Express.
Francis
+3  A: 

Try Qt. Its LGPL so it can be used in closed source software. It provides widgets, networking functions, database access, web rendering via WebKit, animations and many more. Its documentation is one of the best of its kind.

cartman
I've considered Qt and failed to understand when I actually have to go for commercial license and when my project can use LGPL one. I'll most likely have to create custom widgets based on Qt ones and that got me a bit confused if I can still use LGPL version for it.
frgtn
You only go with commercial if you want to link to Qt statically or you modify Qt itself which well never happens. So LGPL is a safe bet.
cartman
+1  A: 

You might want to look at Qt

no_one
+2  A: 

Use QT or wxwidgets

Adinochestva
you can also use gtk , www.gtk.org
Adinochestva
+4  A: 

Check out wxWidgets. Its design is a little old-fashioned, but when you start with it and use the most recent version it should be quite STL friendly. It is free for commercial use, and even when you don't intend to use its cross-platform capabilities it may be a good library for you to write a Windows GUI.

mghie
I've tried Qt for a bit - it integrates nicely with Eclipse-CDT. Does wxWidgets have similar tools/plugins?
frgtn
One advantage of wxwidgets is that you can statically link your application. This permit to have a smaller (exe + dll) application. For example I have a wxWidget program that take only 2Mo whereas "QtGui4.dll" that you have to distribute with your program take more than 11Mo.
Rexxar
@frgtn: I don't know about Eclipse, so I can't really comment on that. There are a few tools for dialog creation, both commercial and free, and there are IDEs specifically geared towards wxWidgets projects. You'll find links on the wxWidgets web site. Sorry, can't be more specific, as I don't know what kind of integration you seek. But a search for Eclipse in the wxWiki might help.
mghie
+2  A: 

As pointed by mghie

wxWidgets is a great library. It has a lot of bindings (.net, lua-my favorite etc) and it has gui editor. Although it generates rather obscure code, you can find simply split ui \ it`s functionality.