C++ MFC vs .NET?

前端 未结 11 1221
梦如初夏
梦如初夏 2021-01-30 08:36

My colleagues are using Visual Studio 2002 and uses the C++ MFC. I am developing in C #.

It has not been any problems before, but now questioning our customers if we re

11条回答
  •  闹比i
    闹比i (楼主)
    2021-01-30 09:14

    It is not one vs. the other. Since version 1.1, Windows Forms supports being hosted by native clients such as IE or MFC dialog. MFC 8.0 wrapped the necessary hosting code in it's Windows Forms support classes so you don't need to write your own. Choose the right library based on your current project's requirements.

    MFC is more than its GDI wrapper classes, however. At one time it designed as the OOP replacement for the underlying Win32 API, pretty much like .Net today. However, MFC did not stop the Win32 API from growing and now I can say win32 APIs grow out of what MFC can support. The number of APIs increased dozens of times in the last decade.

    Windows Forms, on the other hand, was meant to be a replacement only for Windows's GDI system. It's the rest of the .NET Framework libraries that are meant to replace the rest of Win32, like WPF and XNA for DirectX and System.Speech for SAPI. However, I can see win32 APIs grow out of what .Net can keep up without adding downloading size significantly in a few years.

    Therefore Windows Forms cannot do everything MFC can do, it is designed to make GDI+ based RAD easier and may include what MFC can't do. However the GDI+ based Windows Forms is going downhill as Microsoft's refocus on WPF, while MFC revived based on consumer request. If you are designing for future applications you may want to take that into consideration.

提交回复
热议问题