Microsoft Foundation Class Library

The Microsoft Foundation Classes ( MFC) are a collection of object-oriented class libraries developed by Microsoft for programming applications with graphical user interfaces for Windows with C .

History

Microsoft introduced the MFC 1992 with the in-house compiler for C and C. The MFC is supplied with various Microsoft C translators and are part of the full versions of the integrated development environment Microsoft Visual Studio. The free Visual Studio Express editions do not include the MFC. Since Windows 2000, often contain several MFC libraries in an operating system installation or a.

To use translated MFC programs can not install a runtime library is often necessary because on many Windows systems have the " Visual Studio C Runtime 20XX " is installed, which in turn contains the MFC runtime.

A feature of MFC is the use of " Afx " as the prefix of many functions, macros, and its occurrence in the standard precompiled header name "stdafx.h ", which stems from the fact that in the early development of MFC initially called this " Application Framework Extensions" and was abbreviated " Afx ". Only much later " Afx " has been renamed to MFC - so late that these references could not be changed.

In addition to the development by the manufacturer with extensive backwards compatibility, there are numerous supplements available through commercial suppliers and detailed documentation. All controls used in Windows can be used. Thus, current components from Windows and other Microsoft products available (eg Ribbons) in the MFC, and the current Aero theme.

Operation

The MFC serve as an interface to the non- object-oriented API functions of the operating system and should greatly simplify the use of the resources provided by the operating system. Thus, the MFC represent a reaction of the adapter design pattern - instead of only directly use the Win32 API functions, the programmer can now use an adapter the classes of MFC.

The MFC support a modification of Model-View- Controller architecture pattern. It will be made ​​available to the classes CDocument and CView, which CDocument with the model, that is the data container and be implemented with CView both view and controller. The wizard is included with Microsoft Visual Studio allows you to create frameworks using this architecture automatically.

Alternative libraries

Known alternatives to MFC, for example, the Active Template Library ( ATL, also Microsoft), also in combination with the Windows Template Library ( WTL, Microsoft released as open source ), and the Visual Component Library (Borland ). The. NET platform uses a system called Windows Forms, which of the MFC ( and the Thunder Forms System by Visual Basic) was affected. In contrast to MFC not a pure C , but the Microsoft C language extension for GUI development while C / CLI uses. Cross-platform alternatives are Qt and wxWidgets - both based on C - GTK or - based on C. They also have language bindings for Java, Perl, Python, Ruby and other languages ​​.

570426
de