making a GUI in c++

stickybytes

Golden Member
Sep 3, 2003
1,043
0
0
right now, all i know is how to make a program in a command line based form like how you would see things in dos. but how would you make a gui in c++? is it very hard and complex?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
C++ itself is pretty complex, at the most basic level adding a GUI is just utilizing some more classes for window and widget drawing. The problem is what library do you want to use? QT? MFC? Windows.Forms? GTK+?
 

stickybytes

Golden Member
Sep 3, 2003
1,043
0
0
Originally posted by: Nothinman
C++ itself is pretty complex, at the most basic level adding a GUI is just utilizing some more classes for window and widget drawing. The problem is what library do you want to use? QT? MFC? Windows.Forms? GTK+?

right now in class, i am using visual studio 6. its a really old version and we haven't been taught how to create a gui but i thought i would learn about a little about it on the side.
 
Aug 16, 2001
22,505
4
81
Originally posted by: stickybytes
Originally posted by: Nothinman
C++ itself is pretty complex, at the most basic level adding a GUI is just utilizing some more classes for window and widget drawing. The problem is what library do you want to use? QT? MFC? Windows.Forms? GTK+?

right now in class, i am using visual studio 6. its a really old version and we haven't been taught how to create a gui but i thought i would learn about a little about it on the side.

Isn't that done kind of 'automatically' with the Visual xxxxx series?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
right now in class, i am using visual studio 6. its a really old version and we haven't been taught how to create a gui but i thought i would learn about a little about it on the side.

Then you're pretty much stuck with MFC which isn't exactly simple. Way back when, I used a book that walked me through VS 6 and doing the MFC crap isn't that bad once you understand how MS did it, but it's not terribly fun either. If you're going to cover it in class I would say go for it, but if not I would just avoid it. Even if you really want to use VS in the future you should get a copy of VS.NET and learn C# and Windows.Forms, it's much simpler.

Oh and the compiler with VC6 is pretty bad, so if you try to compile your code with anything else there's a good chance it won't work without some changes.

Isn't that done kind of 'automatically' with the Visual xxxxx series?

Making the GUI is simple, but putting the back-end code in and tying it to controls isn't exactly straight forward.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
You probably don't have enough time, or just won't care.. But don't forget there is other things then VB out there.

For instance there is a lot of C++ developement that goes into developing QT-based GUIs in Windows and Linux. KDE is a desktop enviroment in Linux that is QT-based and heavily uses C++. It's all open source and they have supposadly fairly decent documentation so I figure you can learn alot by playing around with applications and maybe even helping out a bit. Get to see experianced programmer's code that gets used in the real world, talk to people and work with others in a large project, debug a bit, that sort of thing. Not the sort of thing that you get to play around with a whole lot in school. There is lots of projects of varying degrees of complexity and skill level. Games, browsers, a RSS reader, simple text editors. That sort of thing.

They have a full GUI based development tools like the Kdevelop IDE.
http://developer.kde.org/
http://www.kdevelop.org/

Not as nice as Visual Basic probably, and it's less common. Just a idea.
I hear of a project to port KDE to work on Windows, and QT developement libraries are used in Windows and in handheld devices. QT isn't part of KDE, although KDE uses it heavily.

http://www.trolltech.com/products/qt/

just a idea.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
If in Visual C++ you create a new "MFC AppWizard EXE > Dialog Based" project it's almost as easy to use as Visual Basic.

Use the resource editor to visually edit buttons and text boxes, use ClassWizard to add function handlers for button clicks.
 

dighn

Lifer
Aug 12, 2001
22,820
4
81
Originally posted by: notfred
In Visual Studio it's just drag and drop.

in visual c++ 6 you can only drag and drop edit dialog boxes. but i guess that's enough for a simple ui.
 

Apathetic

Platinum Member
Dec 23, 2002
2,587
6
81
Well, if you want to use C/C++ (I'm assuming you're running Windows) and want to do it the old school way, check out this book

Dave