BarsMonster
BarsMonster

Reputation: 6585

Windows GUI applications in VisualStudio

What are the valid ways to write (hopefully native) C++ applications with GUI in VS 2010?

I remember some 10 years ago I was using MFC, any big changes today?

Upvotes: 3

Views: 2791

Answers (4)

Edward Strange
Edward Strange

Reputation: 40897

If you really want native, and you really want C++, your best option is WX. MFC has some nice controls and such but still lacks any semblance of a complete UI library. It lacks any layout managers, period and still suffers from being a basic wrapper to the win32 C API. WX has some of this latter issue as well but has been cleaned up considerably from MFC and has layout managers.

A couple other options:

You could break out of C++ and go with one of the .NET languages to use other, better native libraries.

You could use a cross-platform library that'll still have the look and feel of the native toolkits, like Qt or GTKmm.

Upvotes: 1

Tim
Tim

Reputation: 20360

Just for completeness - not advocating it, wxWidgets is a cross-platform GUI toolset.

Upvotes: 1

Brian R. Bondy
Brian R. Bondy

Reputation: 347566

If you want to stay with Native API then MFC is still a good choice or plain Win32 API.
There are new controls like the ribbon control introduced in VS2010. There's a tutorial on native development with VS2010 on MSDN. There are also a lot of C++0x features available to your native program if you're using VS2010.

Qt is another good choice even if you aren't going cross platform but you won't be using VS 2010 most likely in that case. The licensing is now free for commercial use with LGPL.

If you are going to use a newer framework like WPF from Microsoft then you will need to use a managed language (.NET). Another choice is Silverlight for both web and apps. Silverlight apps have the advantage that you can get them to work even on Mac if they have Silverlight installed. Winforms is still easy to code but mostly superseded by WPF.

Unless you have good reason to do so, you can develop much faster with a framework like WPF instead of MFC. Even if you don't know a managed language. (If you don't go straight to C# instead of C++/CLI). WPF also offers GPU acceleration.

Upvotes: 5

Saladin Akara
Saladin Akara

Reputation: 2548

You can use Windows Forms, or Windows Presentation Foundation (WPF) - in VS2010 you can use either of these to create apps with a GUI. In terms of which would be the best - I suppose that depends on your specific needs, but I couldn't say as I've only really used WinForms. However, WPF apps seem to have more components for you to use.

Upvotes: 1

Related Questions