简体   繁体   English

对MFC / .net / WPF感到困惑

[英]confused about MFC/.net/WPF

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. 我想为Windows创建一个桌面应用程序,我知道有一种基于Win32 API的应用程序和另一种基于.net框架的应用程序。

So what is with the MFC, WPF, WinForm etc.? 那么MFC,WPF,WinForm等是什么呢?

From what I've seen they are graphical APIs, so which would I choose for my application? 从我看到它们是图形API,我将为我的应用程序选择哪个?

And is there any good resources (eg books) to learn about the techonology? 是否有任何好的资源(例如书籍)来了解技术?

MFC is a framework for creating GUI applications in native (unmanaged) C++ like the C++ you learned in college. MFC是一个用于在本机(非托管)C ++中创建GUI应用程序的框架,就像您在大学中学到的C ++一样。 The .NET Framework supports writing managed code in C++/CLI, C#, VB.NET or a number of other languages. .NET Framework支持使用C ++ / CLI,C#,VB.NET或许多其他语言编写托管代码。 There are two ways of building a desktop GUI application on the .NET Framework - Windows Forms and WPF. 在.NET Framework上构建桌面GUI应用程序有两种方法 - Windows窗体和WPF。 Windows Forms is older and no longer under active development. Windows窗体较旧,不再处于活动开发状态。 WPF is newer. WPF比较新。

If you know C++ and intend to deploy to machines without the .NET Framework, MFC is a good choice. 如果您了解C ++并打算部署到没有.NET Framework的计算机,MFC是一个不错的选择。 It creates modern-looking UIs and supports Windows 7 features. 它创建了具有现代外观的UI并支持Windows 7功能。 If you're willing to learn C# and deploy to machines with the .NET Framework, consider WPF or Windows Forms. 如果您愿意学习C#并使用.NET Framework部署到计算机,请考虑使用WPF或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. WPF更好地支持图形清晰度(渐变,透明度)和多点触控,Windows 7好东西等等。有些人发现学习起来比较困难,但我认为这只是因为他们很久以前就学过了Windows Forms。 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. 一旦选择了框架,MSDN就会有很多“入门”主题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM