PDA

View Full Version : Desperate for some help


Bender
09-22-2002, 08:44 AM
My Software Engineering class has decided to use C++ instead of Java this semester for our semester project. The project unofficially requires a GUI, yet none of us have any (and I mean ANY) experience with GUI programming in C++.

So what I need is a good online guide to getting started and using GUI elements with C++. The GUI won't be very complicated... it will most likely have buttons, text fields, combo boxes, check boxes and so on... basic widgets. This will all be done in Windows, most likely with VC++ because I'm a college student and can't afford anything they don't sell at the bookstore.

So far, everything I've looked at has made the process seem unbelieveably complicated. Is that pretty much a fact that I'll have to get used to, or is there a guide somewhere that can simplify it all?

Thanks for any recommendations.

sans-hubris
09-22-2002, 12:42 PM
Do you need to use a specifig toolkit, or are you allowed to use any one that you'd like? If the latter, I'd suggest wxWindows (http://www.wxwindows.org). It's very easy to learn.

If the former, that's a bit more difficult, assuming that it would be MFC. MFC is a pretty shoddy toolkit, and very platform specific (obviously.) There is no easy way to learn MFC. All I can suggest is to ask a lot of questions here.

bwkaz
09-22-2002, 01:33 PM
Regarding the cost of everything, Linux, g++, and either the Qt 3 toolkit (with its designer app) or the GTK 2 toolkit (perhaps with Glade?) would be just as easy as VC++ (in my experience they have been), and they're all free. As in speech and beer.

Now if you haven't used Linux before, then there will be a learning curve to it, and this may not be the best route to go. But if you know it fairly well or are good at forgetting everything you know about the way Windows works and relearning stuff from scratch, it may not be all that bad of an idea.

Of course, if you already have VC++, then it's sort of a moot point already, because you've already spent the money on it. If this is the case, just play around, or check out search.microsoft.com, looking for examples of what you need to do. Like a couple summers ago, I was going to need to write some ADO code in VC++ (for work), so I did a couple searches and found a couple of tutorials and at least 2 example programs on MSKB about how to do just that.

Bender
09-22-2002, 02:41 PM
bwkaz: Like I said, it has to be done in the Windows environment. Linux is right out.

sans-hubris: What would really be great is if I was able to build the thing primarily with the VC++ IDE. Is it possible to integrate wxWindows into that? Basically, the aim of the course is to get us to use object-oriented programming to create our application. That part will be cake, it's just the addition of a GUI that's driving us insane (it's not so important we understand the code behind creating the GUIs, just so long as one exists).

Also, does anyone know of any online tutorial/guide/anything that gives some good step by step instructions on how to set up GUIs?

kmj
09-22-2002, 03:34 PM
for windows gui related code, you might want to check out www.codeguru.net and www.codeproject.com dunno if they have any specific tutorials for you, though, sorry.

sans-hubris
09-22-2002, 04:12 PM
Originally posted by Bender
bwkaz: Like I said, it has to be done in the Windows environment. Linux is right out.

sans-hubris: What would really be great is if I was able to build the thing primarily with the VC++ IDE. Is it possible to integrate wxWindows into that? Basically, the aim of the course is to get us to use object-oriented programming to create our application. That part will be cake, it's just the addition of a GUI that's driving us insane (it's not so important we understand the code behind creating the GUIs, just so long as one exists).

Also, does anyone know of any online tutorial/guide/anything that gives some good step by step instructions on how to set up GUIs? GUIs are fairly easy when you're not doing dialog boxes. Well, even dialog boxes aren't that much more difficult. For most windows, you just need to worry about menus, the options that users select from those menus, and a document. For dialog boxes, you need to worry about the positioning of things like buttons, text boxes, check boxes, radio buttons, etc. and then you just need to figure out what to do when a user does something to those things.

As far as the integration of wxWindows into VC++, I do know that you can install some software that makes it easy to start a new project (similar to starting a MFC project in VC++.) As for editing the layout of dialog boxes, I have not seen anything that integrates that feature into VC++ yet. wxWindows uses an external tool to edit the layout of dialog boxes, and its fairly old and not very good. They are working on a newer one that's much better and more complete, but it's not in any manner close to being finished.

Bender
09-22-2002, 04:25 PM
I've been playing around with wxWindows, and it's fairly straighforward (man, have I been spoiled with Java), but I have one question which is probably pretty dumb... but oh well.

After I compile the program, I can run it on any Windows installation, right? I don't need for the machine to have the wxWindows installation on it, right?

kmj
09-22-2002, 11:25 PM
dunno if it helps; but google found me this page:
http://www.wxwindows.org/technote/distwin.htm

sans-hubris
09-22-2002, 11:40 PM
Originally posted by Bender
I've been playing around with wxWindows, and it's fairly straighforward (man, have I been spoiled with Java), but I have one question which is probably pretty dumb... but oh well.

After I compile the program, I can run it on any Windows installation, right? I don't need for the machine to have the wxWindows installation on it, right? It depends. If you're distributing source code, you'll need to be sure that wxWindows is included (especially if you make any modifications to it like I do sometimes.)

If you're distributing just binaries, then just compile everything statically and you'll be fine.