Where do I start learning about GUI programming? [closed] - user-interface

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I have a pretty good knowledge of programming languages like C/C++, Java, Python. But they were all mostly learnt in a college / high school class room setting where the best user interface was a numbered menu. You know, the standard data structures, implementation of various algorithms, file handling and the like.
What I want to do now is to get into GUI programming. I am not sure if I am asking the right way, but I am looking at using the WIMP paradigm (windows icons menus pointers). I want to place buttons and forms. Event driven programming, I believe is the right word, where my application waits till the user clicks something, types something etc.
Given my background, where would be a good place to start? I am looking at the following requirements -
1> Preferably cross platform.
2> Lots of documentations, tutorials, and if possible sample code that I can learn off of
3> A good GUI builder tool, where I can drag / drop stuff the way I want them to be displayed.
Any ideas or suggestions to get me started?

I'l try the book About face: Essential of User Interface Design, its centered on design practices for UI as well as designing taking into account the user goals, that is, what the user wants to acomplish trying to get you away for the "developer GUI design".
It also reviews some history about GUI design from Microsoft, Apple and other companys. Things like defaults for MacOsX (where the accept and cancel buttons are usually located, etc) as well and the whys beneath that.
I'll also look up the Office 2007 UI Design Guidelines for Microsoft as it's probably "gonna be a thing".

Shoes for Ruby is cross platform, very easy, and is a brief introduction to building a window and handling events that happen in it. fun too :)

You're looking for Qt. It's a cross-platform C++ GUI framework, and it includes everything you asked for and more.
It's free for open-source projects to use, provided you're using the GPL.

There is a great deal of language and UI framework specific resources available for people interested in building application UIs. However, before delving into specific technologies, there is much to be learned about Human-Computer Interaction and how it applies to user interface design. Some references to look at:
http://www.useit.com/
The Design of Everyday Things (book)
http://worrydream.com/MagicInk (takes awhile to load but very worthwhile)
After researching what makes a good UI, it is time to explore how:
Mozilla XULRunner
If you decide to use Java Swing, I strongly recommend the relative layout manager
Of course there are many options out there, including QT, Fltk and SWT

I was thinking exactly the same thing recently. Qt seems like a good cross platform GUI framework, and Python seems like a good language to work in.
So PyQt is my (uneducated) suggestion. It does include a drag and drop GUI design tool.

Take a look at Glade and Gtk. Both are really easy to use. Glade is the GUI builder, and Gtk the toolkit. It's both cross platform and cross language. You can load the Glade files in almost any language. Here is a Glade/Gtk tutorial

I would look into C# .NET development and its WinForms API. It's much easier to program GUI desktop apps for Windows with that than with the Win32 API. You can always ease into Win32 API stuff later, if it's still relevant.
For cross-platform solutions, look into Gtk+, perhaps PyGtk. Another good one is WxWidgets.
If you want to get really funky, check out Shoes for Ruby.

Many years ago, I made the quickest progress in this area using Visual Basic. I assume it's still dead easy to pick up and the code/run/debug cycle is insanely productive and you'll learn a lotta useful stuff fast. Tons of documentation, and all the other goodies you want...

Seeing as you already have knowledge of Java you should check out the Swing API here, it provides a pretty powerful set of packages that can be used to create complex GUI's. Moreover, its cross platform, there's tons of documentation and it can be used with the Netbeans IDE.

Java's Swing API is cross platform and relatively simple, and NetBeans is a good GUI builder.

Netbeans is cross platform, and while it is centered towards Java developers, you can easily install addons to work with C/C++, Ruby, etc. I use it for developing Swing GUI programs because it has a very simple interface for simple drag and drop GUI creation. There is a lot of good documentation on developing with Java Swing, and I'm sure there is plenty of documentation on using Netbeans also.

Related

How to start programming in Windows? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I've made simple programs in C and C++ with simple compilers (learned it in university; I'm Statistics student). Also I'm amateur PHP programer.
Now I want to start programming for Windows.
apps with user interface
apps without user interface
My aim is just to see how it is done. And I might make a basic app that interacts with a database which is in a web server.
Where should I start? Windows Visual Studio? .NET? What should I know?
If you actually want to learn the underlying API then you should start off without one of the frameworks.
Learn it the way we did it all those years ago with Charles Petzold's book, Programming Windows. A really good foundation of knowledge of how windows and messages work will serve you well.
In the longer term, a good framework, e.g. WinForms, Qt, VCL etc. will increase productivity. But if you start with one of them, then you are in danger of not knowing the difference between sent and queued messages, not knowing the difference between an HWND, an HDC and a HANDLE, and so on.
A good framework, is great, but you'll get more out of it if you understand what's underneath it.
See this question:
C# GUI programming for beginners: Where to start?
Especially this answer there.
I think you should start with Windows Form, WPF is the new thing for Windows Dev and its getting all the lime light, but I would really not recommend starting off with it.
Get Visual Studio 2010 Express
See this MSDN page on Windows Forms
Programming Windows Forms by Charles Petzold is nice book (Charles is very cool) , windows forms hasn't changed all too much since Visual 2005, you should learn C# 4, the latest language.
Visual C# 2010 Step by Step is a good book to get a gist of the .NET world and all your options (including WPF)
See these SO questions:
Beginners book for .NET and C#?
https://stackoverflow.com/questions/4807574/best-c-programing-books-for-absolute-beginner-or-someone-just-starting-with-net
https://stackoverflow.com/questions/52926/beginning-c
Hope that helps.
Update
Incase you were thinking of going with C or C++ for windows development, is it not easy. I've done some Win32 API and believe me you'll be writing seriously long/complicated programs for even simple things
You have two MS options, you can just use the C or C++ language and call the Win32 API functions.
This book is the Bible for that.
The other MS option is using MFC, people have some rather strong (bad) views about MFC. I haven't done much of it myself so can't say too much.
See : https://stackoverflow.com/questions/557114/stick-with-mfc-or-go-to-net
There are of course tons of non-MS options, which again I wouldn't recommend.
See : Native Windows Application Development Options
Bottom line, in my opinion, C# is a very well done language, you will get TONs of support here, Visual Studio is one of the best tools around, and you will have fun learning C#/.NET, and the biggest advantage is you can use your C# knowledge to write even Web Apps, Cloud and Mobile apps and lots more.
I'm not sure why people don't use cross-platform GUI toolkits more often. I tend to write my GUI in Java, and transfer control over to C++ for the actual program logic. If you know about the MVC architectural pattern, you can use Java to implement the view and controller, and C++ to implement the view. If the program is simple and performance isn't critical, then I often code everything directly in Java. I've listed a few pros of cons of using Java for coding UI instead to other languages below.
Pros
Java already has a large library full of useful utilities, and is a good starting point from which one may learn other languages. There's many well-tested Swing components that are ready to use, and tutorials online that give you good starting points for many common use cases.
Check out the JogAmp website, and try out their demos. I prefer using C/C++ to do the rendering and Java only for the user-interface, but if performance is not critical, the JogAmp APIs a lot of flexibility in terms of controlling which subset of OpenGL you would like to use.
Java has extensive support for databases and servlets - check out the JDBC API.
Java is open-source, and does not restrict you to using a particular IDE (or operating system!).
Java comes with a builtin documentation generator called Javadoc, and it works really well. In fact, documentation for the JDK is generated using it.
Cons
Java is an interpreted language, so performance will typically be worse than that of other compiled languages.
Java forces you to frame your entire program logic using objected-oriented principles, even when they aren't a good fit for your particular use case (e.g. simple, one-off experiments). Sometimes your code can end up being much more verbose than it needs to be in order to accomplish a particular task.
Edit: There are plenty of resources for beginners, such as this one.
I'm going to go out on a limb and recommend C# using Visual Studio 2010 C# Express. It keeps you familiar with the C/C++ style your probably familiar with.
There are various sample codes available for download. I found them very helpful when I was starting to learn to program for windows phone.
Visual Studio works great for C#. You should probably consider creating an account with microsoft whether via outlook.com if you plan on publishing what you develop.
If you want to develop for windows 8, I would advise that you install windows 8 and develop using that.
I think you can start with C#.net and then ASP.net

Want to learn Windows Programming,some suggestions? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Someone told me to use MFC,but it seems that MFC will be dead,although its not already...
so if i want to learn windows programming now, which one should i choose? thx.
I encourage you to learn C#, personally is one of the best programming languages for windows nowadays (personal opinion)
If you want to go to the raw Win32API (Which I think you will learn the most and a must-have for your bookshelf)... Charles Petzold's Bible is a must-have... MFC, ATL, C# Winforms are all basically wrappers for the true API architecture using nice properties/events....
If you really want to learn windows programming, start with Petzold's Programming Windows book. You'll get a good understanding of how Windows actually works, which is invaluable when dealing with the more abstracted frameworks.
Then skip over to Windows Forms or WPF. MFC isn't worth the headache.
If you are going to program at the windows api level, you would be better off using something like Qt.
learn plain win32 API not waste your time on MFC ... that is my opinion
I'm with Andres on this one, learn C#.
Additionally you might consider working with java some. There is a huge knowledge base there and in my experience it and C# cross over a lot in syntax and form.
If you are looking for problems consider Project Euler or Programming Praxis
If your goal is to learn the Windows API, MFC isn't a bad place to start. It's a really thin wrapper around the API, nearly transparent in most cases. Perhaps the biggest difference is in the message handling mechanism. In MFC you use macros to generate a table of message handling functions, and many messages get rerouted automatically from parent to child or vice versa. In a raw API program you'll typically see a message loop with a huge switch statement, and it all gets handled in one place.
Depends on the type of application you want to create? The latest forms-based programming is WPF... that is the latest and greatest, but Windows Forms programming is also an option too (there's a lot leveraged in this still).
HTH.
Depends, like everything in the IT world depends of what you need.
But C# or Java is a good start!.
WPF or WinForms with C#.
With WPF you can create very flexible GUIs, WinForms is more traditional.
Try Expression Blend for creating GUI (WPF) and Visual Studio for coding :)
Well it depends on what you want to do. Are you new to programming in general? If so then I would suggest picking up a good programming book or going to a college and enrolling in a CS degree program.
If you already know how to program and just want to write windows programs you have several options. Which one you pick depends on what you want to do and who your target audience is.
Win32 API - The lowest level you can get. It's OLD OLD OLD school C code, but you can write small fast good looking programs. You have to do pretty much everything yourself. The Win32 API is pretty complicated and you have to know the ins and outs to write the best code possible.
MFC (Microsoft Foundation Classes) - Takes the Win32 API and encapsulates it in C++ classes. It's again OLD OLD school but has recently been upgraded from MS with the new 2008 feature pack so it's far from dead.
.NET (C#, VB) - The brand spanking new stuff from MS. It's incredibly easy to write code and create programs. However it does hide all the lower level stuff from you so you just write C# or whatever and it always works.
And of course you can always write in Delphi, Qt, WxWidgets but these are simply wrappers for the win32 API.
As far as my personal choice goes it depends on what I'm doing. At my job I write C# because the hardware/software is under my control. I know what version of the framework is going to be installed, how much RAM, hard disk space, etc. For my own projects I create I almost always use MFC. It hides the nastiness of the Win32 API and gives me C++ power. Would I prefer to make everything .net, absolutely but I've found not a lot of people have the .net framework installed so I was severely limiting my user base.

Develop a Qt/GTK-Like Framework

I'm now with a idea to start the development of a bare bones Qt/GTK+-like framework, but I want to know some things before I start the creation of this project:
What is the structure of GTK+ and Qt?
Do I need to develop a window manager to build my own framework?
Some resources to start?
Developing a GUI/Application framework is a significant undertaking. You might want to be very clear about why you need to write yet an other framework.
Both projects you mention are open source. Why not start there?
GTK: git clone git://git.gnome.org/gtk+
Qt: git clone git://gitorious.org/qt/qt.git
Ed You ask what the structure of GTK and Qt are, whether you need to write your own widow manager (answer: no) and how to get started. Answers to at least the first two are in the source code. Don't forget, great practitioners in any field learn by watching others. Reading code is no different.
Writing a GUI/app framework would be a great learning experience, but even a fairly small app framework would be a very big job, and not something you really should tackle until you're fairly expert in writing applications using several other frameworks and widget toolkits.
I did something like this once, back in the early years of this decade. That was after I'd been programming for the Mac for over 15 years, Windows over 10, and had programmed both directly to their native graphics, event, and widget APIs, as well as various object-oriented toolkits for them including PowerPlant, MFC, and MacApp. When I started working on a PalmOS application, I spent a couple of weeks writing a very small app framework modeled on PowerPlant. But I could not have succeeded at all without those decades of broad and deep experience with so many GUI systems.
Doing this for Linux/X11 is even more work. That's because, unlike Mac OS and Windows, neither X11 nor Linux supply built-in user interface widgets, or much in the way of graphics primitives or text layout capabilities. GTK+ is part of the GNOME ecosystem; it provides the widgets, gets its message queue and internal communications from GObject, relies on GDK to abstract and simplify its graphics and event communications with X11, and uses Pango and Cairo for text rendering and layout. I work all through that system, and it probably represents many dozens of person-years of hard work by a lot of really smart people. And I'm sure Qt is very similar.
So if you really want to do this, I would recommend you:
Write programs with a lot of different app and widget toolkits, on multiple operating systems. That will help you learn not just how such systems work, but why they are designed as they are. And it will give you some feeling for what works well, and what works poorly.
Contribute bug fixes or new features to one or more of the various open-source frameworks. GTK+ has a list of tasks for beginners to work on. Another great open-source framework is wxWidgets.
Become an expert-level C/C++ programmer.
When you've done that for a few years, you will have the expertise suitable for tackling your own framework.
That sounds like a major undertaking, at least as a starting project.
Not sure what you mean by "the structure" of e.g. GTK+. You can see the object hierarchy for GTK+, that tells you at least how the implemented objects (GTK+ is an object-oriented API) relate to each other. You can guess how the code can be structured, from that information.
And no, you don't need to write your own window manager; the toolkits mainly concern themselves with what happens inside windows, not with the window management itself. Of course you could decide that your "platform" should have a wider scope, and include a WM.
I think some of the answers here might exaggerate a bit. Obviously making something of the same quality, width and depth as Qt and Gtk is a huge untertaking. But you can make simpler stuff and still learn a lot about how it works. I suggest doing like I did in university. Use OpenGL with Glut. Then you got basic drawing functionality and event system in place already. You then need to create classes for buttons, text fields etc.
If you want to make it really simple then each component just needs to know where it is drawn and have some sort of bounding box where you check whether mouse click are inside or not. You also needs to create some system which makes it possible for buttons, check boxes etc to tell the rest of your code that they were clicked.
This isn't really the rocket science people here make it out to be. Games have made their own very simple GUI toolkits for years. You can try that approach as well. I have modeled a simple GUI tookit on top of a game engine before. Your buttons and textfield could be simply be sprites.
But yeah, if you want to make something that will compete with Gtk+ and Qt, forget about it. That is a team effort over many years.

Preferable technology that I should use to create an efficient and user friendly GUI?

There are many more technologies and tools available to build the front end for an application.
Which is the best technology/tool/platform available using which I can build a better GUI, by which I'll be able to build a nice looking as well as an efficient GUI?
Definition of "better" includes factors such as efficiency,user friendliness,better content control mechanism, navigation and many more.
I know this is a question about which GUI toolkit you should use, but your first technology for producing a user-friendly UI is pen and paper. Sketch out some mock-ups. Draw buttons and menus on construction paper, cut them out, and glue them together. Then try your mockups on about a half-dozen people. You'll quickly find out what makes a good UI.
It doesn't matter how good the UI looks or whether it uses the latest snazzy effects -- if your users can't figure out how to use it, they'll go elsewhere. You need to learn what works for your target audience before you write a single line of code.
Read Don't Make Me Think to learn how to make mock-ups and do user testing.
If' you're tracking an IP address, you'll definitely want to create your GUI Interface in Visual Basic.
Use the .NET framework in Visual Studio 2005/2008/2010 Studio. I haven't developed in any other environment, but I have been able to create nice looking apps in this IDE / Framework.
"Best" depends on what your evaluation function is.
For ease of development, and high quality UI, in a non-web based app it's hard to beat C#/VB or any other .NET language and environment for a windows-based app. Depending on the quality of the UI, MPF will give you greater flexibility and control, whereas windows form will make it easier to develop.
Having used Windows Presentation Foundation for a while now i would highly recommend it. There is a pretty big learning curve and, to be honest, MSFT should have included some controls (the datagrid being the biggest one) that were not included by default (but will be in .NET 4.0). Where WPF and XAML exceed is providing a foundation from which you can build just about anything. You can style ANY part of ANY control and build your own composite controls from scratch. A lot of thought went into binding and value converters and once you get used to the declarative nature of XAML you wont want to turn back. The company I work for has been using it for a couple of years now and the difference between the GUIs we used to develop (mainly winforms and asp.net) and what we develop now are night and day in terms of both look-and-feel and functionality. My two cents anyway...
It depends.
What device will the GUI be used on, hand held, PC, Mac?
What platform Windows, Linux, Web?
What kind of application will it be, accounting, email client, web application?
What audience will be using the application (a GUI aimed at a child may be different than one aimed at an adult)?
All of these things must be taken into account before even starting to formulate an answer to your question.
You have several choices for developing a GUI.
first, if cross platform is an issue consider using Java or Python.
you can also use Adobe AIR and develop the gui in Flex.
If you direct the product to windows only users .NET WPF is the best solution, with a very rich set of control and examples.
You can also use .NET with mono for cross platform compatibility, but WPF isn't currently supported.
Desktop, Mobile, Windows, Linux, Database, OpenGL: Nokia Qt. Wiht Python - PyQt development process is shortest and easy. Application containing all required python & qt libraries and modules is around 30MB with Inno Setup installation is 8MB and will work on Windows 2000 and newer for Python 2.6.x, Python 2.5.x based application will run from Windows 95 to Windows 7.
I think all the attributes you list -- efficiency, user friendliness, etc -- are attributes of a good design rather than a good toolkit. Just about any toolkit can be used to meet those goals. I think the question might be different if you were asking about eye candy, fancy multi-media, etc. There are definitely some toolkits that do that better than others.
If you're interested in usability first (and it sounds like you are), focus on the design then pick whatever toolkit meets your current abilities and can handle your design. For example, if you require 3D images that might narrow your choices; likewise if you need to show videos, that will influence which toolkits you can choose from.
So, start with a good design. From that, create a list of requires for the toolkit -- rich editing controls, video, 3D, etc. And then look for a toolkit that provides what you need.
The best toolkit in the world won't make up for poor design.
Personally after having used Win32, Forms and WPF then going to Mac/iPhone GUI development, I very much prefer the flexibility and high quality of visuals in the Mac/iPhone GUI.
One of the most useful examples is the fact that in NSTable/UITable controls (ListViews or similar in Windows), every cell is a fully customisable View (a Control in Windows).
Where in a ListView you have very little customisation for each cell/item in the view since you only provide details, not an actual control, an NSTable/UITable asks you for a table cell which you can add anything to, such as buttons, switches and image views.
Mac OS GUI development to me is a LOT more flexible and more consistently flexible in that regard. Everything is a View so I can my own contents to anything.
Have you considered Silverlight?
It can be used to create internet applications, but it can also be run out of browser to create desktop applications. It's has significant overlap with WPF though there are differences which might catch you out when swapping from one to the other.
Expression Blend 3 is a very good visual designer and the code it produces is quite efficient.

Where is a good place to start programming GUIs for windows? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I have experience writing console and network client/server applications in C and C++, but I know next to nothing about using the win32 visual API, MFC, Qt, wxWidgets, etc. Where is a good place to start, and what method should I specialize in, so as to be future ready and robust?
This is a rather broad question, as programming GUI applications in Windows can be done in so many ways.
There are two main parts to developing any GUI app: the language and the API/framework. Considering you're interested in learning to build Windows GUI apps, the language isn't really a point of focus for you. Hence, you should pick a language you already know and work with a framework or API that can be harnessed by your chosen language.
If you want to use C you're pretty much restricted to dealing with the Win32 API yourself, in which case reading Petzold or Richter would be great places to start. The Win32 API can be quite daunting, but it's well worth the effort to learn (imho). There are plenty of tutorials on Win32 on the web, and there's always MSDN, with a complete reference/guide to the Win32 API. Make sure you cover not just the API, but other areas such as resources/dialogs as they are building blocks for your Win32 application.
If you want to use C++ you have all of the options that you have when using C plus a few others. I'd recommend going with the Win32 API directly, and then moving on to a known framework such as MFC, Qt, wxWindows or GTK so that you can spend less time working with boilerplate code and instead focus on writing your application logic. The last 3 options I just listed have the added benefit of being cross-platform, so you don't have to worry too much about platform-specific issues. Given that you said you want to work with Windows, I'll assume you're keen to focus on that rather than cross-platform -- so go with MFC, but spend some time with the Win32 API first to get familiar with some of the concepts.
When dealing with MFC and the Win32 API, it's a good idea to try and get a solid understanding of the terminology prior to writing code. For example, you need to understand what the message pump is, and how it works. You need to know about concepts such as "owner-drawn controls", and subclassing. When you understand these things (and more), you'll find it easier to work with MFC because it uses similar terminology in its class interfaces (eg. you need to know what "translate messages" means before you can understand how and when to use PreTranslateMessage).
You could also use Managed C++ to write .NET GUI applications, but I've read in a few places that Managed C++ wasn't really intended to be used in this manner. Instead it should be used as a gateway between native/unmanaged code and managed code. If you're using .NET it's best to use a .NET language such as VB.NET or C# to build your GUIs.
So if you are going to use .NET, you currently have the choice of the WinForms library, or WPF. I personally feel that you'd be wasting time learning to build WinForms applications given that WPF is designed to replace it. Over time WPF will become more prevelant and Winforms will most likely die off. WPF has a much richer API set, and doesn't suffer from many of the limitations that Winforms does. If you do choose this route, however, you'll no doubt have to learn XAML, which is a markup language that drives WPF applications. This technology is coming of age, and there are many great places to learn about it. First, there are sites such as LearnWPF, and DrWPF which have some really great articles. Secondly, there are plenty of quality books on the topic.
So, to sum up, once you've picked your language and tech, the path is actually quite easy. Just pick up a book or two, read some blogs, get into some code samples.. and most importantly ... write code. Keep writing, keep making mistakes, and keep learning from them.
As a final note...
In other words, Silverlight. If you don't want to go the MS route you might give Adobe's Flash/Flex a look see. Both Silverlight and Flash/Flex build RIA's. Which I think is where we are headed. They days of Office like apps are numbered
I don't agree at all. Silverlight is not the same as WPF. Silverlight is web-specific, and only has a subset of WPF's features. Given that the question asks for Windows GUI apps, Flash/Flex Rich Internet Apps are not really a fitting suggestion. I also don't agree that the days of Rich Client Applications (such as office) are numbered at all.
I hope that helps. Good luck :)
I don't know if I'd call it a good place to start, but if you want to be future ready, take a look at the windows presentation foundation which is built entirely for the purpose of programming GUI's for windows
My first experience writing simple GUI applications for Windows was with C# and Visual Studio. The GUI-building interface is a simple drag and drop deal that generates skeleton methods based on potential user actions. I only did fairly basic programming with this, but I imagine it would be an excellent place to start to learn the basics and extend into the more advanced capabilities as you go.
There are plenty of online Win32 tutorials:
http://www.zeusedit.com/forum/viewtopic.php?t=1218
There are plenty of compilers to choose from:
http://www.zeusedit.com/forum/viewtopic.php?t=238
I would also recommend getting the Borland Win32 SDK documentation in WinHelp file format:
http://www.zeusedit.com/forum/viewtopic.php?t=7
It only covers the bare basics of the Win32, but when starting, this can be helpful as it is less daunting and less bloated than the MSDN.
I'd never go down the Silverlight, Flash/Flex or any similar route. It does look nice, but the main problem is that the code of the engine that runs it is completely closed-box and controlled by a single company. Take, for example 64bit versions of both of those. If some new platform emerges, you won't be able to migrate your existing code to it.
For business apps, Windows Forms is very mature. It provides a gentle path from auto-generating a lot for you into allowing fine-grained control and rolling your own. There are tons of high-quality third party controls and a large body of examples, docs, etc out there. It's hard to run into a problem that someone else hasn't solved. I highly recommend acquiring some background Win32 knowledge (e.g. Petzold) as the WinForms framework lives on top of it.
I have no WPF experience, but from the sample apps I've seen it looks like a good choice for apps whose interfaces would benefit from more graphical metaphors. So if you're doing a banking app, probably not worth the extra design overhead. But if you're doing, say, a warehouse management app it could be improved by dropping pretty boxes into pretty bins.
#StephenCox: wrong answer to the wrong question. OP is asking about desktop client apps, and moreover, WPF != Silverlight.
For a simple starting point to get your head around the "event-driven" nature basically all frameworks are created around look at FLTK.
Here are some quick starting videos Link
For professional use I'd recommend Qt, expensive but often worth it in commercial situations.
Since you are already familiar with C and C++ I would recommend learning how to write a simple Windows GUI app using Charles Petzold's book. It will give you the fundamental understanding of how Windows works. It's good to understand that most everything that you see is a window (a button is a window for example) and that these windows respond to messages. I wouldnt' spend a lot of time on this though and you don't necessarily need to do this first if you are going to chose WPF. I just think it's good to have a basic understanding of this.
There was a good podcast recently on .Net Rocks called "Kate Gregory Develops in C++ for Vista!" on there she recommends that someone starting out now should not use/learn MFC (even though it has been recently updated).
As far as getting ready for the future you need to learn WPF, but it isn't complete yet, so depending on the kinds of client side apps you want to create, you will probably need to learn WinForms. The majority of people aren't using WPF yet, so it's a good time to start learning. I think you will find it easier using C# to learn it instead of doing managed code with C++.
Get your basics right first. Best tutorial I've found is: http://winprog.org/tutorial/start.html
After that, although the homepage is hatefully distasteful, the tutorial pages are good in content and aesthetics: http://www.tenouk.com/cplusmfcdotnet.html
Then of course there's MSDN.

Resources