Microsoft Foundation Class Library

Microsoft Foundation Class Library
Developer(s) Microsoft
Initial release 1992
Stable release
14.0.24212.0 / 2 August 2016[1]
Written in C++
Operating system Microsoft Windows
Type Development library
License Proprietary
Website msdn.microsoft.com/en-us/library/d06h2x6e(v=VS.120).aspx

The Microsoft Foundation Class Library (also Microsoft Foundation Classes or MFC) is a library that wraps portions of the Windows API in C++ classes, including functionality that enables them to use a default application framework. Classes are defined for many of the handle-managed Windows objects and also for predefined windows and common controls.

History

MFC was introduced in 1992 with Microsoft's C/C++ 7.0 compiler for use with 16-bit versions of Windows as an extremely thin object-oriented C++ wrapper for the Windows API. C++ was just beginning to replace C for development of commercial application software at the time. In an MFC program, direct Windows API calls are rarely needed. Instead, programs create objects from Microsoft Foundation Class classes and call member functions belonging to those objects. Many of those functions share their names with corresponding API functions.[2]

One interesting quirk of MFC is the use of "Afx" as the prefix for many functions, macros and the standard precompiled header name "stdafx.h". During early development, what became MFC was called "Application Framework Extensions" and abbreviated "Afx". The name Microsoft Foundation Classes (MFC) was adopted too late in the release cycle to change these references.

MFC 8.0 was released with Visual Studio 2005. MFC 9.0 was released with Visual Studio 2008. MFC is not included in the freeware Visual C++ Express[3] but is included in the commercial versions of Visual C++ 2010 and later, and in Visual Studio Community.

The Object Windows Library (OWL), designed for use with Borland's Turbo C++ compiler, was a competing product introduced by Borland around the same time. Eventually, Borland discontinued OWL development and licensed the distribution of the MFC headers, libraries and DLLs from Microsoft[4] for a short time, though it never offered fully integrated support for MFC. Borland later released VCL (Visual Component Library) to replace the OWL framework.

Microsoft's emphasis on MFC has been reduced in favor of its .NET Framework. MFC 7, 8 and 9 bridge elements of MFC with the .NET Framework to aid developers in migrating to the new framework. The MSVC++ compiler backend can emit managed and native object file(s). The linker can then build them together, generating mixed (both managed and native) applications, allowing existing native applications to use managed extensions in a seamless manner. Though Microsoft has de-emphasized MFC, it remains a widely used framework.

A lightweight alternative to MFC is the Windows Template Library (WTL). C++ Express version compiles WTL applications (if Active Template Library is installed), but does not include the IDE support of the Standard, Professional and Team editions.

Features

At the time of its introduction, MFC provided C++ macros for Windows message-handling (via Message Maps[5] ), exceptions, run-time type identification (RTTI), serialization and dynamic class instantiation.

The macros for message-handling aimed to reduce memory consumption by avoiding gratuitous virtual table use and also to provide a more concrete structure for various Visual C++-supplied tools to edit and manipulate code without parsing the full language. The message-handling macros replaced the virtual function mechanism provided by C++.

The macros for serialization, exceptions, and RTTI predated availability of these features in Microsoft C++ by a number of years. 32-bit versions of MFC, for Windows NT 3.1 and later Windows operating systems, used compilers that implemented the language features and updated the macros to simply wrap the language features instead of providing customized implementations, realizing upward compatibility.

Visual C++ 2008 Feature Pack

On 7 April 2008, Microsoft released an update to the MFC classes as an out-of-band update to Visual Studio 2008 and MFC 9.[6] The update features new user interface constructs, including the ribbons (similar to that of Microsoft Office 2007) and associated UI widgets, fully customizable toolbars, docking panes (like Visual Studio 2005) which can either be freely floated or docked to any side and document tabs.[7] The MFC ribbon resource editor allows the developer to design the ribbon graphically instead of having to use the XML-based declarative markup like the RibbonX API in Microsoft Office 2007. Optionally, ribbon components may be programmed directly by calling a new set of ribbon class methods. The developer may mix graphical and programmatic ribbon development as is convenient. The MFC application wizard has also been upgraded to support the new features – including a check-box to select whether the application will use the ribbon or the Visual Studio 2005 user interface elements. The new functionality is provided in new classes so that old applications still continue to run.[7] This update is building on top of BCGSoft’s BCGControlBar Library Professional Edition.[8]

MFC can be used by linking a static library or by adding the MFC DLL.

Microsoft has also imposed additional licensing requirements on users of the ribbons.[9] These include a requirement to adhere to Microsoft UI Design Guidelines, and a anti-competition clause prohibiting the use of the UI in applications which compete with Microsoft Office applications.

Versions

Product version .Net Version Library MFC version Year introduced
Microsoft C/C++ 7.0 MFC 1.0 1992
Visual C++ 1.0 MFC 2.0
Visual C++ 1.5 MFC 2.5
Visual C++ 1.51 MFC 2.51
Visual C++ 1.52c MFC 2.5 (Last development platform for Windows 3.x)
Visual C++ 2.0 MFC 3.0
Visual C++ 2.1 MFC 3.1
Visual C++ 2.2 MFC 3.2
Visual C++ 4.0 MFC 4.0 (mfc40.dll included with Windows 95) August 1995
Visual C++ 4.1 MFC 4.1
Visual C++ 4.2 MFC 4.2 (mfc42.dll included with the Windows 98 original release) March 1998
eMbedded Visual C++ 3.0 mfc42.dll MFC 4.2
Visual C++ 5.0 mfc42.dll MFC 4.21, a major upgrade from MFC 4.2.
Visual C++ 6.0 mfc42.dll MFC 6.0 1998
eMbedded Visual C++ 4.0 mfcce400.dll MFC 6.0
Visual C++ .NET 2002 (Visual C++ 7.0) 1.0 mfc70.dll MFC 7.0 February 2002
Visual C++ .NET 2003 (Visual C++ 7.1)
Visual C++ .NET 2003 + MS11-025[10]
1.1 mfc71.dll MFC 7.1
MFC 7.10.6119.0
April 2003
April 2011
Visual C++ 2005 (Visual C++ 8.0)
Visual C++ 2005 SP1
Visual C++ 2005 SP1 + MS09-035[11][12]
Visual C++ 2005 SP1 + MS11-025[10]
Visual C++ 2005 SP1 + MS11-025[13]
2.0 mfc80.dll MFC 8.0.50727.42
MFC 8.0.50727.762
MFC 8.0.50727.4053
MFC 8.0.50727.5592
MFC 8.0.50727.6195
October 2005
June 2007
July 2009
April 2011
June 2011
Visual C++ 2008 (Visual C++ 9.0)
Visual C++ 2008 with Feature Pack
Visual C++ 2008 SP1
Visual C++ 2008 SP1 + MS09-035[11][12]
Visual C++ 2008 SP1 + MS11-025[10]
3.5 mfc90.dll MFC 9.0.21022.8
MFC 9.0.30411
MFC 9.0.30729.1
MFC 9.0.30729.4148
MFC 9.0.30729.5570
November 2007
April 2008
August 2008
July 2009
April 2011
Visual C++ 2010 (Visual C++ 10.0)
Visual C++ 2010 + MS11-025[10]
Visual C++ 2010 SP1
Visual C++ 2010 SP1 + MS11-025[10]
4.0 mfc100.dll MFC 10.0.30319.1
MFC 10.0.30319.415
MFC 10.0.40219.1
MFC 10.0.40219.325
April 2010[14]
April 2011
March 2011
August 2011
Visual C++ 2012 (Visual C++ 11.0)
Visual C++ 2012 Update 1
Visual C++ 2012 Update 3
Visual C++ 2012 Update 4
4.5 mfc110.dll MFC 11.0.50727.1
MFC 11.0.51106.1
MFC 11.0.60610.1
MFC 11.0.61030
26 July 2012
5 November 2012
26 June 2013
20 November 2013
Visual C++ 2013 (Visual C++ 12.0)
Visual C++ 2013 Update 2
4.5.1, 4.5.2 mfc120.dll MFC 12.0.21005.1
MFC 12.0.30501.0
5 October 2013
30 December 2014[15]
Visual C++ 2015 (Visual C++ 14.0)
Visual C++ 2015 Update 1
Visual C++ 2015 Update 2
Visual C++ 2015 Update 3
Visual C++ 2015 Update 3 + KB3165756
4.6
4.6.1
mfc140.dll MFC 14.0.23026.0
MFC 14.0.23506.0
MFC 14.0.23918.0
MFC 14.0.24210.0
MFC 14.0.24212.0
20 July 2015
30 November 2015[16]
30 March 2016[17]
27 June 2016[18]
2 August 2016[19]

See also

References

  1. "Microsoft Visual Studio 2015 Update 3 (KB3165756)". Msdn.microsoft.com. Retrieved 2016-08-28.
  2. Visual C++ Express Overview
  3. "Visual Studio Express Edition FAQ". Microsoft.com. Archived from the original on 11 June 2011. Retrieved 6 January 2012.
  4. "Microsoft Buys Into Inprise, Settles Disputes". Techweb.com. Retrieved 6 January 2012.
  5. Williams, Mickey; David Bennett. "Creating Your Own Message Maps". Inform IT.
  6. "Visual C++ 2008 Feature Pack shipped". Blogs.msdn.com. Retrieved 26 April 2008.
  7. 1 2 "Quick Tour of New MFC functionality". Blogs.msdn.com. Retrieved 16 November 2007.
  8. "MFC Update Powered By BCGSoft". Msdn2.microsoft.com. Retrieved 16 November 2007.
  9. "Visual C++ 2008 Feature Pack Release Download Page". Microsoft.com. Retrieved 16 May 2008.
  10. 1 2 3 4 5 "Microsoft Security Bulletin MS11-025 - Important : Vulnerability in Microsoft Foundation Class (MFC) Library Could Allow Remote Code Execution (2500212)". Microsoft.com. Retrieved 2012-11-19.
  11. 1 2 "Microsoft Security Bulletin MS09-035 - Moderate : Vulnerabilities in Visual Studio Active Template Library Could Allow Remote Code Execution (969706)". Microsoft.com. Retrieved 2012-11-19.
  12. 1 2 https://web.archive.org/web/20101026203218/http://www.microsoft.com/security/atl.aspx. Archived from the original on 26 October 2010. Retrieved 29 October 2010. Missing or empty |title= (help)
  13. VS80sp1-KB2538218-v2-X86-INTL.exe. "Download Microsoft Visual Studio 2005 Service Pack 1 MFC Security Update from Official Microsoft Download Center". Microsoft.com. Retrieved 2012-11-19.
  14. "Visual C++ - Exploring New C++ and MFC Features in Visual Studio 2010". Msdn.microsoft.com. Retrieved 2012-11-19.
  15. "Visual C++ Redistributable Packages for Visual Studio 2013". Msdn.microsoft.com. Retrieved 2014-12-30.
  16. "Visual Studio 2015 Update 1". Msdn.microsoft.com. Retrieved 2016-06-12.
  17. "Visual Studio 2015 Update 2". Msdn.microsoft.com. Retrieved 2016-06-12.
  18. "Visual Studio 2015 Update 3". Msdn.microsoft.com. Retrieved 2016-06-28.
  19. "Microsoft Visual Studio 2015 Update 3 (KB3165756)". Msdn.microsoft.com. Retrieved 2016-08-28.

Further reading

This article is issued from Wikipedia - version of the 12/1/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.