tags:

views:

461

answers:

11

There are now so many ways to write windows apps, win32, MFC, ATL, .NET, WinForms, and probably some others that I don't know of. Which one should I choose? I'd like one that works on a fresh install of Vista, and is modern and easy to use.

+14  A: 

I highly recommend Qt. It's cross-platform, very easy to use and LGPL licensed.

Ryan Emerle
QT won't work on a fresh Vista install unless the QT DLL's are installed. Plus, the licensing is expensive and multiple versions http://www.qtsoftware.com/products/licensing
Daniel A. White
The Commercial licensing is NOT expensive relative to a typical developer's salary, IMO it's false economy to eliminate a $3k software package without considering how it may increase your productivity. Additionally, the new LGPL licensing allows you to develop closed-source applications FOR FREE (no purchase necessary).
KeyserSoze
I figured it more important to provide an option not included by the question poster.
Ryan Emerle
I wonder what the size of the QT DLL is compared to the .NET framework.
davr
Qt being LGPL, the only case where you have to think about the commercial licenses are:- to get support- if you statically link to QtElse, it's as cheap as any other Microsoft SDK.
Bluebird75
I downloaded the offline installer for .NET 3.5SP1. Its 197MB. The DLLs for Qt (uncompressed, etc) weigh in at about 20MB.
sep
+1  A: 

Short answer... It depends.

Whats your skillset/background? Why are you developing a desktop app? Is it for work or as an experiment for you to learn something new? Will there be multiple other developers working on it and whats they're skillset?

My personal preference would be winforms because that's what I spend most time coding in (in C#). They're very quick to put together and the VS IDE is very quick & stable for building the UI elements of your application. And you can publish/deploy them using Click Once which allows easy updating of the clients when you make changes & updates.

Alternatively, you might want to look at WPF which is the new Presentation Foundation in .NET 3.5. This will allow you to leverage a newer "shinier" UI experience for desktop applications.

Eoin Campbell
I'm pretty much an amateur with C++, my previous experience was with PHP, and I'm still a student, so no work experience, and no other developers.
That would have been key to mention in your question.
Ryan Emerle
A: 

Straight up Win32 is getting better with the Scenic Ribbon. Will work on Vista and Windows 7.

Daniel A. White
+5  A: 

If you are amateur with C++ you'll have much easier time learning WinForms than any of the native Visual C++ frameworks (Win32, MVC, etc.). WPF will give you best versatily. It's a bit harder to master than WinForms but managed and so keeps you away from the nasty Win32 stuff.

The native frameworks are good mainly if you want to crunch the last bits of performance or need to keep the footprint small for stuff such as shell extensions.

I'd recommend checking WinForms at least first to get some quick understanding of the principles. If WinForms doesn't suit you, you can then move to either C++ if you feel you need more low level control or WPF if you wish more shiny features like skinning and theming.

Edit:
Though if you have a look at WPF, remember that fresh Vista contains only .Net 3.0 so 3.5 and 3.5 SP1 features require a separate runtime installation.

Mikko Rantanen
Jim Harte
Yup. Which is why I mentioned WPF. But .Net 3.5 and .Net 3.5 SP 1 brought more features to WPF which aren't available in fresh Vista installation. WebBrowser comes to mind for example: http://msdn.microsoft.com/en-us/library/system.windows.controls.webbrowser.aspx
Mikko Rantanen
Yes. I misinterpreted your edit...
Jim Harte
I'm slightly confused on the downvotes. Please leave a comment if there is something unhelpful with this other than recommending a Microsoft technology instead of Qt.
Mikko Rantanen
He asks for a C++ solution and your answer is to use c#?
Martin Beckett
@mgb: One could design an interface with WPF and C# and interact with it via C++/CLI
Ben Collins
@mgb: I know he asked for C++. But he does list WinForms and .Net as possibilities so I don't think he insists on native C++. As Ben noted C++/CLI is a C++ way to write managed code. Additionally since he stated that he is an amateur with C++ I had a reason to believe he wanted a C++ GUI system as he has SOME experience with C++. But he does not have experience with GUI programming (Since he is asking this question). In this case I would have felt confident enough to explicitly recommend C# as I believe the complexity of learning C# + WinForms is less than that of learning Win32 from scratch.
Mikko Rantanen
A: 

I'm probably biased (aren't we all?), but since your question states you're interested in Windows development and you want a modern and easy to use GUI framework that's works with Vista out of the box, the obvious answer is .NET WinForms.

Jim Harte
You must have ignored the 'modern' part! *Hides under the WPF abstractions*
Mikko Rantanen
Well, relatively speaking, it's the most modern of the options the asker listed and it's certainly easier to use than WPF (today). Maybe next year when VS2010 comes out, WPF will be the obvious answer.
Jim Harte
Yup, I figured. Couldn't help myself though! WinForms designer is pretty close to WYSIWYG. I think WPF applications could be created in a similar way but its strengths lie in the XAML and all the templates and such.
Mikko Rantanen
A: 

I personally prefer gtkmm. Although it doesn't look as good as Qt or the native frameworks on Windows, I think the API is the most transparent among all frameworks I tried. It feels very OOish, and is very easy to learn. You can easily create GUI layouts with Glade, but you can also create decent designs with nothing but code. In this regard, gtkmm is similar to Java GUI programming.

wilhelmtell
+2  A: 

Hi!

actuallly it's very easy to start with Qt - you get a complete SDK incl. a very nice IDE as a simple package and a smart integration into VisualStudio.

Plus the LGPL licensing which allows anybody to write opensource and closed source/commercial apps without paying any fees - the commercial support/licenses are optionally!

The biggest advantage of Qt is the very easy to learn and very very clean C++ API, which can do more than just building GUI apps (it supports low leven networking and file io etc.).

Best regards, Chris

3DH
A: 

I would recommend WxWidgets. The API is easy to understand; it is very well documented with samples; and it is cross-platform. If you are programming an application that is going to have any a large number of users, you will eventually want to have the option of running it on a different operating system. By choosing a Microsoft only API you will permanently put yourself into the Microsoft corner. Getting out will require a serious refactoring of your software which will require that you learn yet another API. Take my advice and start with a cross-platform API - it will save you a lot of grief in the future.

jay
A: 

I would recommend C++Builder 2009, which can create applications that work with Windows 2000, XP and Vista.

stukelly
A: 

If you go the Microsoft route, be sure to check which frameworks they are putting the most muscle behind lately. For instance, MFC is an older framework that should NOT be used for new development because MS isn't putting any time into it, and the marketplace for add-on MFC components has dried up and blown away.

Basically, when choosing MS backed technology, make sure you pick one that isn't already on the outs.

Michael Kohne
A: 

So you're a student with only PHP knowledge? Well before even considering a GUI you'll need to come up to speed in a proper language. I would suggest C# as you are already used to curly braces and you want to program Windows. WinForms is part of .Net, not a separate thing. Just download Visual Studio 2008 Express and you're up and running. By the way, GUI programming can be hard in any language, especially after you move past the stage of toy programs to real apps.

If you knew C++ to a higher degree I would have suggested Qt. Simply because the new LGPL licensing removes the final impediment. It's also cross-platform, high quality, high performance and now has the financial backing of a huge company (Nokia) to ensure further development.

20th Century Boy