Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

confused about MFC/.net/WPF

Tags:

c++

c#

.net

wpf

mfc

I want to create a desktop application for windows, I know there's one type of application based on Win32 API and another based on the .net framework.

So what is with the MFC, WPF, WinForm etc.?

From what I've seen they are graphical APIs, so which would I choose for my application?

And is there any good resources (e.g. books) to learn about the techonology?

like image 707
brian14708 Avatar asked Mar 26 '11 16:03

brian14708


1 Answers

MFC is a framework for creating GUI applications in native (unmanaged) C++ like the C++ you learned in college. The .NET Framework supports writing managed code in C++/CLI, C#, VB.NET or a number of other languages. There are two ways of building a desktop GUI application on the .NET Framework - Windows Forms and WPF. Windows Forms is older and no longer under active development. WPF is newer.

If you know C++ and intend to deploy to machines without the .NET Framework, MFC is a good choice. It creates modern-looking UIs and supports Windows 7 features. If you're willing to learn C# and deploy to machines with the .NET Framework, consider WPF or Windows Forms. For your basic "drag on a button, double-click to edit the handler, type some code in the click handler" apps there is no difference between them. WPF has better support for graphical coolness (gradients, transparency) and for multi-touch, Windows 7 goodies etc. Some people find it harder to learn, but I think that's just because they learned Windows Forms ages ago. If you're starting from nothing you could learn either and might as well learn the newer one.

MSDN has plenty of "getting started" topics once you've chosen a framework.

like image 195
Kate Gregory Avatar answered Sep 28 '22 12:09

Kate Gregory