• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

I need some help on making GUIs in C++

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

andyl33t

Member
Joined
Nov 25, 2004
Location
U.K
Hi, sorry if this has been asked before but I need some help on this topic. I am currently learning C++, and all the programs that I create are in a command box form. I want to create GUI programs. What should I use to create these GUI programs? I have got a wxwidgets book and I do not understand any of it. Could someone explain to me what I need to do in order to create GUIs. Please note that I have no knowledge with any other programming languages, only C++.

Thank you very much
 
Do you expect us to retell everything that's written down in several hundred pages in a book? Your question is kinde of unspecific
 
klingens said:
A basic question: do you know what event driven programming is?

Everybody has to start somewhere ;)

A different question:
Is your book just a documentation book or does it provide a guide to learning what you want to know?
 
Yes, event driven programming is the main thing you need to learn when going to GUI from console. So if he doesn't know he should first try to understand that: after this everything else he tries is so much easier, since he now knows the main concept GUIs are based on.

At least for me it all made a whole lot more sense.
 
so what would you recommend to do? master c++ in console form, and then what after that?

Thanks
 
QT is another good cross-platform GUI system. You can get it free for personal, academic, and open source use, IIRC. I'm planning on learning it sometime soon. -- Paul
 
I'd second a vote for wx. Get the open source book linked above. I'd probably master console based C++ first before diving into wx. As macklin mentions, QT is also very good (it's almost the exact same thing as wx... but it's not free in the sense of GNU free software... wx is completely free). I think wx uses a bsd style license, ie. no copyleft, but it's full open source. Trolltech uses a weird license for QT which is semi-free, but not completely.

QT is the widget set behind a lot of popular software, including the KDE environment in linux.

Both wx and QT will allow you to write software once and compile it with minimal/no alterations on multiple platforms (including Linux, BSD, Windows, Mac OSX, etc.)

I tend to go for wx because it's free (free as in free speech, not as in free beer... although it's free as in beer too).
 
Thanks for the wx info, MRD. Would you happen to have a link on getting wx to work well with mingw (g++ on windows)? I remember having tried it out once, but was frustrated at getting it to communicate well with my open source compiler.

Thanks -- Paul

*edit*
I see that this tutorial describes how to use wx with mingw and eclipse. What isn't clear to me, however, is how well it works without the eclipse IDE, which I don't particularly care to use. (I prefer just editing the text of source code and compiling at command line, usually with a makefile.) -- Paul
 
I actually got it working with MingW myself, without really any issues. I installed off the CD-ROM that came with the book, and it all worked flawlessly.

If you can possibly justify the cost of the book, I'd order it. There are a lot of nice development goodies on the cdrom, making it well worth it imo.

If you don't want to spend the money, I can probably scan the chapter on installing it. The book is published under the open document license, so it can be reproduced legally. Also, because of that, I wouldn't be surprised if you can find the full text of it online somewhere.
 
I recommend the wxDev-C++ install - http://wxdsgn.sourceforge.net/

This combines a graphical form editor, the wx library, the devcpp ide, and the mingw compiler in one easy install. It will compile first time after installing and avoid some of the difficulties of trying to install these components separately.
 
Back