Microsoft Foundation Class Library (MFC) is a C++ object-oriented library for developing desktop applications for Windows.

MFC was introduced by Microsoft in 1992 and quickly gained widespread use. While Microsoft has introduced alternative application frameworks since then, MFC remains widely used.

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. Direct Windows API calls in an MFC program 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.

One 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. On April 7, 2008, Microsoft released an update to the MFC classes as an out-of-band update to Visual Studio 2008 and MFC 9. The update features new user interface constructs, including the ribbons and associated UI widgets, fully customizable toolbars, docking panes which can either be freely floated or docked to any side and document tabs.

MFC was initially a feature of the commercial versions of Visual Studio. As such, it is not included in the freeware Visual C++ Express. The Community edition of Visual Studio, introduced in 2014, however, includes MFC.

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 for a short time, though it never offered fully integrated support for MFC. Borland later released Visual Component Library to replace the OWL framework.

Features

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.

At the time of its introduction, MFC provided C++ macros for Windows message-handling (via Message Maps ), 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.

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. 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 docking panes. The new functionality is provided in new classes so that old applications still continue to run. This update builds on top of BCGSoft’s BCGControlBar Library Professional Edition. Microsoft has imposed additional licensing requirements on users of the ribbons. These include a requirement to adhere to Microsoft UI Design Guidelines, and an anti-competition clause prohibiting the use of the UI in applications which compete with Microsoft Office.

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

Versions

ProductLibraryFile VersionRelease dateRemarks
NameVersion
Microsoft C/C++ 7.0mafxcw.libFebruary 26, 1992
Microsoft Visual C++ 1.0Visual C++ 1.0mfc200.dll2.0.0.1February 1993
Visual C++ 1.5mfc250.dll2.5.0.0December 1993
Visual C++ 1.51mfc250.dll2.5.1.0September 1994Released with Visual C++ 2.0
Visual C++ 1.52mfc250.dll2.5.2.0January 1995Released with Visual C++ 2.1
Visual C++ 1.52bmfc250.dll2.5.3.0July 1995Released with Visual C++ 2.2
Visual C++ 1.52cmfc250.dll2.5.3.0November 1995Released with Visual C++ 4.0
Microsoft Visual C++ 2.0Visual C++ 2.0mfc30.dll3.0.0.0September 1994
Visual C++ 2.1mfc30.dll3.1.0.0January 1995
Visual C++ 2.2mfc30.dll3.2.0.0July 1995
Microsoft Visual C++ 4.0Visual C++ 4.0mfc40.dll4.0.0.5277November 1995
Visual C++ 4.1mfc40.dll4.1.0.6038March 1996
Visual C++ 4.1amfc40.dll4.1.0.6130July 1996?Q150937
Visual C++ 4.1bmfc40.dll4.1.0.6139September 1996?Q154428
Visual C++ 4.2mfc42.dll4.2.0.6068July 1996
Visual C++ 4.2bmfc42.dll4.2.0.6256September 1996?Q156934
Microsoft Visual C++ 5.0Visual C++ 5.0mfc42.dll4.21.0.7022March 19, 1997
Visual C++ 5.0 SP14.21.0.7160July 3, 1997
Visual C++ 5.0 SP24.21.0.7160August 26, 1997
Visual C++ 5.0 SP34.21.0.7303December 4, 1997
Microsoft Visual C++ 6.0Visual C++ 6.0mfc42.dll6.0.8168.0September 2, 1998
Visual C++ 6.0 SP16.0.8267.0October 30, 1998
Visual C++ 6.0 SP26.0.8267.0January 21, 1999
Visual C++ 6.0 SP36.0.8447.0May 21, 1999
Visual C++ 6.0 SP46.0.8665.0June 27, 2000
Visual C++ 6.0 SP56.0.8665.0February 26, 2001
Visual C++ 6.0 SP66.0.9782.0March 29, 2004
Microsoft Visual C++ .NET 2002Visual C++ .NET 2002 (Visual C++ 7.0)mfc70.dll7.0.9466.0February 13, 2002
Visual C++ .NET 2002 + MS07-012 (KB924641)7.0.9801.0February 27, 2008
Visual C++ .NET 2002 SP17.0.9955.0March 8, 2005
Visual C++ .NET 2002 SP1 + MS07-012 (KB924642)7.0.9975.0February 27, 2008
Microsoft Visual C++ .NET 2003Visual C++ .NET 2003 (Visual C++ 7.1)mfc71.dll7.10.3077.0April 24, 2003
Visual C++ .NET 2003 + MS07-012 (KB924643)7.10.5057.0February 27, 2008
Visual C++ .NET 2003 SP17.10.6030.0August 15, 2006
Visual C++ .NET 2003 SP1 + MS07-012 (KB927696)7.10.6041.0February 27, 2008
Visual C++ .NET 2003 SP1 + MS09-035 (KB971089)7.10.6101.0July 28, 2009
Visual C++ .NET 2003 SP1 + MS11-025 (KB2465373)7.10.6119.0April 12, 2011
Microsoft Visual C++ 2005Visual C++ 2005 (Visual C++ 8.0)mfc80.dll8.0.50727.42 (included in redist 8.0.50727.42/8.0.50727.42)April 10, 2006
Visual C++ 2005 SP18.0.50727.762 (included in redist 8.0.56336/8.0.56336)August 27, 2007
Visual C++ 2005 SP1 + MS09-035 (KB973544)8.0.50727.4053 (included in redist 8.0.59192/8.0.59193)July 28, 2009
Visual C++ 2005 SP1 + MS11-025 (KB2467175)8.0.50727.5592April 12, 2011
Visual C++ 2005 SP1 + MS11-025 (KB2538242)8.0.50727.6195 (included in redist 8.0.61000/8.0.61001)June 14, 2011
Microsoft Visual C++ 2008Visual C++ 2008 (Visual C++ 9.0)mfc90.dll9.0.21022.8November 19, 2007
Visual C++ 2008 + MS09-035 (KB973551)9.0.21022.218July 28, 2009
Visual C++ 2008 Feature Pack9.0.30411.0April 7, 2008Refresh: April 22, 2008
Visual C++ 2008 SP19.0.30729.1August 11, 2008
Visual C++ 2008 SP1 + MS09-035 (KB973552)9.0.30729.4148July 28, 2009
Visual C++ 2008 SP1 + MS11-025 (KB2467174)9.0.30729.5570April 12, 2011
Visual C++ 2008 SP1 + MS11-025 (KB2538243)9.0.30729.6161 (installer has version 9.0.30729.5677)June 14, 2011
Microsoft Visual C++ 2010Visual C++ 2010 (Visual C++ 10.0)mfc100.dll10.0.30319.1April 12, 2010
Visual C++ 2010 + MS11-025 (KB2467173)10.0.30319.415April 12, 2011
Visual C++ 2010 SP110.0.40219.1March 10, 2011
Visual C++ 2010 SP1 + MS11-025 (KB2565063)10.0.40219.325August 9, 2011
Microsoft Visual C++ 2012Visual C++ 2012 (Visual C++ 11.0)mfc110.dll11.0.50727.1September 12, 2012
Visual C++ 2012 Update 111.0.51106.1November 26, 2012
Visual C++ 2012 Update 311.0.60610.1June 26, 2013
Visual C++ 2012 Update 411.0.61030.0November 13, 2013
Microsoft Visual C++ 2013Visual C++ 2013 (Visual C++ 12.0)mfc120.dll12.0.21005.1October 17, 2013
Visual C++ 2013 Update 212.0.30501.0May 12, 2014
Visual C++ 2013 Update 5 + KB313836712.0.40649.5February 2016?
Visual C++ 2013 Update 5 + KB317956012.0.40660.0July 2016?
Visual C++ 2013 Update 5 + KB403293812.0.40664.0July 18, 2017
Microsoft Visual C++ 2015Visual C++ 2015 (Visual C++ 14.0)mfc140.dll14.0.23026.0July 20, 2015
Visual C++ 2015 Update 114.0.23506.0November 30, 2015
Visual C++ 2015 Update 214.0.23918.0March 30, 2016
Visual C++ 2015 Update 314.0.24210.0June 27, 2016
Visual C++ 2015 Update 314.0.24212.0August 18, 2016
Visual C++ 2015 Update 3 + KB316575614.0.24215.1September 14, 2016
Visual C++ 2015 Update 314.0.24245.0November 13, 2018
Visual C++ 2015 Update 314.0.24247.2June 13, 2023
Microsoft Visual C++ 2017Visual C++ 15.0mfc140.dll14.10.25008.0March 7, 2017
Visual C++ 15.1?14.10.25017.0April 5, 2017?
Visual C++ 15.214.11.25325.0May 10, 2017
Visual C++ 15.414.12.25810.0October 9, 2017
Visual C++ 15.614.13.26020.0March 5, 2018
Visual C++ 15.714.14.26405.0May 7, 2018
Visual C++ 15.7.3?14.14.26429.4May 31, 2018
Visual C++ 15.814.15.26706.0August 14, 2018
Visual C++ 15.914.16.27012.6November 13, 2018
Visual C++ 15.9.514.16.27024.1January 8, 2019
Visual C++ 15.9.614.16.27026.1January 24, 2019
Visual C++ 15.9.914.16.27027.1March 12, 2019
Visual C++ 15.9.1514.16.27033.0August 13, 2019
Visual C++ 15.9.6714.16.27052.0October 8, 2024
Microsoft Visual C++ 2019Visual C++ 16.0.0mfc140.dll14.20.27508.1April 2, 2019
Visual C++ 16.0.1014.20.27519.0December 10, 2019
Visual C++ 16.1.014.21.27702.2May 21, 2019
Visual C++ 16.2.014.22.27821.0July 24, 2019
Visual C++ 16.3.014.23.27820.0September 23, 2019
Visual C++ 16.4.014.24.28127.4December 3, 2019
Visual C++ 16.5.014.25.28508.3March 16, 2020
Visual C++ 16.6.014.26.28720.3May 19, 2020
Visual C++ 16.6.314.26.28808.1June 30, 2020
Visual C++ 16.7.014.27.29016.0August 5, 2020
Visual C++ 16.7.514.27.29112.0September 29, 2020
Visual C++ 16.7.814.27.29114.0November 10, 2020
Visual C++ 16.8.014.28.29325.2November 10, 2020
Visual C++ 16.8.214.28.29334.0November 19, 2020
Visual C++ 16.9.014.28.29910.0March 2, 2021
Visual C++ 16.9.214.28.29913.0March 16, 2021
Visual C++ 16.9.414.28.29914.0April 13, 2021
Visual C++ 16.9.914.28.29918.0July 13, 2021
Visual C++ 16.10.014.29.30037.0May 25, 2021
Visual C++ 16.10.214.29.30038.0June 15, 2021
Visual C++ 16.10.414.29.30040.0July 20, 2021
Visual C++ 16.11.014.29.30133.0August 10, 2021
Visual C++ 16.11.414.29.30135.0October 5, 2021
Visual C++ 16.11.914.29.30139.0January 11, 2022
Visual C++ 16.11.3214.29.30153.0November 14, 2023
Visual C++ 16.11.4114.29.30156.0October 8, 2024
Visual C++ 16.11.4214.29.30157.0November 12, 2024
Microsoft Visual C++ 2022Visual C++ 17.0.0mfc140.dll14.30.30704.0November 8, 2021
Visual C++ 17.0.514.30.30708.0January 13, 2022
Visual C++ 17.1.014.31.31103.0February 15, 2022
Visual C++ 17.2.014.32.31326.0May 10, 2022
Visual C++ 17.2.514.32.31332.0June 22, 2022
Visual C++ 17.2.2214.32.31342.0November 14, 2023
Visual C++ 17.4.014.34.31931.0November 8, 2022
Visual C++ 17.4.514.34.31938.0February 14, 2023
Visual C++ 17.4.1414.34.31948.0November 14, 2023
Visual C++ 17.6.014.36.32532.0May 16, 2023
Visual C++ 17.6.1014.36.32543.0November 14, 2023
Visual C++ 17.6.2014.36.32547.0October 8, 2024
Visual C++ 17.7.714.36.32543.0November 14, 2023
Visual C++ 17.8.014.38.33130.0November 14, 2023
Visual C++ 17.8.614.38.33135.0January 30, 2024
Visual C++ 17.8.1514.38.33142.0October 8, 2024
Visual C++ 17.10.014.40.33810.0May 21, 2024
Visual C++ 17.10.814.40.33816.0October 8, 2024
Visual C++ 17.11.514.40.33816.0October 8, 2024
Visual C++ 17.12.014.42.34433.0November 12, 2024
Visual C++ 17.12.514.42.34438.0February 11, 2025
Visual C++ 17.14.014.44.35112.1May 13, 2025
Visual C++ 17.14.314.44.35208.0May 28, 2025
Visual C++ 17.14.814.44.35211.0July 08, 2025

See also

Notes

Further reading

External links

  • - Microsoft
  • - Microsoft
  • - Microsoft
  • - Microsoft
  • (covers the major MFC 9 updates) - Microsoft