tags:

views:

268

answers:

5

I'm thinking about writing a very simple paint program. I would like a more advanced method of inputting data into my program like colors, thickness of the brush, etc. I would like to use a GUI library so I can program buttons and menus to make input easier.

Any suggestions?

(I'm running Visual C++ 2005 SP1)

+16  A: 

Qt is a pretty solid GUI application framework. It is cross-platform, well documented, supported, and free.

fbrereto
with Qt you start-up creating a "simple paint program" and end-up creating huge software such as Google Earth :)
Lawand
Ever since QT went LGPL'd, I don't see any reason not to use it in any C++ application, OSS, commercial, or otherwise. It beats all competitors on performance, feature-completeness, stability, and documentation by a very large margin.
Pavel Minaev
Not to mention Qt comes with several "simple paint program"-like demos to learn from.
Graphics Noob
+4  A: 

Does GTK+ not suit your needs? It has a lot of advanced controls for handling colour input (being originally design for GIMP). gtkmm is:

the official C++ interface for the popular GUI library GTK+. Highlights include typesafe callbacks, and a comprehensive set of widgets that are easily extensible via inheritance. You can create user interfaces either in code or with the Glade User Interface designer, using libglademm. There's extensive documentation, including API reference and a tutorial.

Qt is also a possibility. Both will allow you to write [mostly] platform independent code.

kjfletch
While there is Gtk/Win32, Gtk applications still look somewhat foreign on Windows - the "native" theme is far from perfect. Setting it up to work with VS might also be a hassle.
Pavel Minaev
+3  A: 

Why not use either ATL or MFC, as they're both supplied with VS2005 anyway...

Another option would be WTL, which comes recommended by some former colleagues of mine.

Rowland Shaw
Or Windows Froms
Nick
You *could* but I'd normally recommend using C# (or VB.Net) for winforms, rather than MC++
Rowland Shaw
Another vote for WTL
Nemanja Trifunovic
MFC is fairly low-level and inflexible, and you're in to a world of hurt if you try to do anything non-standard. ATL+WTL is even more low-level, and you'll be dealing with raw API calls half of the time. All in all, unless output binary size is a constraint (as it often is for e.g. ActiveX controls), using either MFC or ATL/WTL leads to unproductive waste of time compared to a high-level framework such as Qt.
Pavel Minaev
Most MFC tutorials I've seen use the example of a simple paint program, which is why I mentioned that (also, it promotes the Document-View model which is quite similar to the currently in-vogue ones such as MVC). MFC just happens to be out of vogue at the moment. It would at least offer some WYSIWYG support, which is more than, say, QT.
Rowland Shaw
QT has a great WYSIWYG editor.
Ron Warholic
+5  A: 

wxWidgets is a cross-platform, open source GUI library that has some nice graphics features.

computergeek6
+2  A: 

A few of your options:

  • Win32 API
  • Qt
  • .NET framework (using C++/CLI)
  • wxWidgets

My usual choice: Win32 API

My recommendation for you: Qt

EDIT: Actually a simple paint program sounds very doable using only Win32 API and GDI+. If you feel brave enough, then you may want to give that a try. (I tend to be kind of biased to lightweight solutions.)

StackedCrooked
can i use the QT library in visual studios 05?
TheFuzz
Well you could, but not with graphical widget+layout design support. But, Qt has its own version of that, actually 2 versions, Designer (just designs the GUI), and Creator (which is a whole IDE; Designer, editor, and debugger, in one).
JDonner
@TheFuzz, yes you can, there are some tutorials available on the net for this. As JDonner is saying, you won't get the visual designer if you are using Visual Studio, but don't worry about that. It's only a tool that allows you to draw widgets visually like in Visual Basic. You don't really need it, actually I even prefer making my GUI's in code.
StackedCrooked