tags:

views:

148

answers:

4

I have some knowledge in C/C++ but only using the Console. I'd like to start programming some graphical interfaces, but I don't have the minimal idea where to start.

I've heard of GUI applications and DirectX applications. I'd like to know which is the best for start programming?

Which libraries also is good to use and some tutorials if possible.

+7  A: 

What's your platform?

If you only care about Windows and don't mind an outdated technology, you can go to MFC way.

If you want a cross-platform GUI toolkit; there are several:

  • GTK
  • WxWidget
  • Qt

If you want something more about drawing, instead of boring GUI forms; then you can learn either:

  • OpenGL (cross-platform)
  • DirectX (Windows-only)

For simple uses, and if you're in Windows, you can use GDI+, which is also rather outdated.

Newer .NET platforms have GUI technologies with fancy names, though I'm not quite acquaintanced with them to suggest anything.

Lie Ryan
It would be nice to get rid of 3 main toolkits and just have one xplatform one, but it doesn't look like that will happen soon, so take your pick.
Ali Lown
If you have to learn something for Windows DO NOT learn MFC. Use native API calls, MFC does not give any advantage over them and it's really ugly.
nico
If you want to get your GUI working quickly without a lot of hassle, Qt is a very good choice.
Jeremy Friesner
@Jeremy Friesner: Personally, I find GTK much easier to deal with than Qt, but I guess it really comes down to personal preferences.
nico
A: 

If you are on windows the best way to learn is use C++ Builder. Embarcadaro ( or whatever ) offers a free version if you want. Just google C++ Builder.

HandyGandy
As someone who uses this product everyday, there are a couple of caveats that should be considered. You can produce a very nice GUI interface, however I've found the not all the Delphi components are available in c++, making some of the more complicated objects hard to do. There is only limited support in open source world for this complier, so if he is going to stick with c++, his options are somewhat limited. Lastly, with Rad Studio 2010, I've found the documentation very limited. Overall, HandyGandy is correct in his recommendation, but this would not be my first recommendation.
photo_tom
A: 

If you're on Windows, go for Windows Presentation Foundation (WPF). Don't loose time on those traditional GUI-Toolkits, they are past. The present (don't dare to tell about future) are declarative, highly customizable 2D/3D/Multimedia integrated environments, such as WPF.

paul_71
Oh, quite a bunch of fanatic WPF haters around here. Would you be so kind and comment if you downvote...?!
paul_71
I did not downvote, but maybe you should explain why you think WPF is better than GTK, Qt etc etc. I never used it, and from your answer I don't really get what are its positive AND negative points (one negative point that comes to mind just looking at the name is that it is not cross-platform).
nico
It may be much easier for beginner to start creating UI with WPF. Although Visual Studio designer is less than helpful, one could use something like Expression Blend. I never heard of such high quality tools for Qt or GTK. And I would argue that designing good UI (i.e. from i18n standpoint) using these technologies is hard, nearly impossible for a newcomer.
Paweł Dyda
@nico Unlike the mentioned frameworks, WPF is more than just another GUI toolkit. I mentioned few keywords in my post (declarative, integrated) but there's more: extremely powerful, great rapid development tools, huge amount of development resources available in printed + online format and many more... Last but not least, it's backed by (still) largest software firm in the world and a de facto industry standard... and believe me, developing against WPF framwork is much, much easier than with those other unnamed toolkits - I did both.
paul_71
@Pawel You are right, there isn't anything nearly comparable to the design tools available for WPF. Another point I forgot to mention: I know a lot of people who - by principle - damn anything carrying Microsoft badge on it. But in most cases the last thing they've dealt with was a pre realease version of MFC in the early '90s...
paul_71
@paul_71: have you ever used GTK+ or WxWidget or Qt? They are the big names on cross-platform, cross-language widget kits (unlike AWT/Swing, which is cross-platform, but Java VM only). GTK+ is as powerful as WPF. Gtk+ have (declarative) XML-based UI language (and I heard Wx and Qt as well, though don't quote me on them). Firefox, GIMP, Inkscape, Nokia's Maemo platform, and many others runs on Gtk+. It has a very good GUI builder (Glade), though I would agree that Visual Studio GUI Builder is a bit more polished.
Lie Ryan
@paul_71: Gtk+ is very powerful, there are some widgets that you don't see in WPF applications (though vice versa applies). Gtk+ is *highly* themeable, both by application developer AND end user. And you'll never beat the amount of documentation that an open source project have; Gtk+ have a very comprehensive documentations and tutorials on the internet (printed documentation may be a bit lacking, though nothing prevents you from printing those online docs yourself); and if you think that these aren't enough, you can easily peek at their source code.
Lie Ryan
@paul_71: WxWidget and Qt is also just as powerful as Gtk+. In short, many of the advantages you mentioned are not really the advantage of WPF alone. In addition to that, your baseless, inflammatory comment will lead some people to downvote you (not me though, I very rarely downvote anyone).
Lie Ryan
+1  A: 

If you're using Windows 7, please take a look at the excellent Hilo series of tutorials for developing rich UI applications in C++. You may also find that this is a good excuse to begin learning C#/.NET, as GUI development is especially easy to do in it.

Kevin D.