# Microsoft Foundation Class Library

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. 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.
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

| Product | Product | Library | Version | Release date | Remarks |
| Name | Version | Library | Version | Release date | Remarks |
| Microsoft C/C++ 7.0 | | mafxcw.lib | MFC 1.0 | February 26, 1992 | |
| Microsoft Visual C++ 1.0 | Visual C++ 1.0 | mfc200.dll | MFC 2.0 | 1993 | |
| Microsoft Visual C++ 1.0 | Visual C++ 1.5 | mfc250.dll | MFC 2.5 | 1993 | |
| Microsoft Visual C++ 1.0 | Visual C++ 1.51 | mfc250.dll | MFC 2.51 | 1994 | |
| Microsoft Visual C++ 1.0 | Visual C++ 1.52 | mfc250.dll | MFC 2.52 | 1995 | |
| Microsoft Visual C++ 1.0 | Visual C++ 1.52b | mfc250.dll | MFC 2.53 | 1995 | |
| Microsoft Visual C++ 1.0 | Visual C++ 1.52c | mfc250.dll | MFC 2.53 | 1995 | Last development platform for Windows 3.x |
| Microsoft Visual C++ 2.0 | Visual C++ 2.0 | mfc30.dll | MFC 3.0 | 1994 | |
| Microsoft Visual C++ 2.0 | Visual C++ 2.1 | mfc30.dll | MFC 3.1 | 1995 | |
| Microsoft Visual C++ 2.0 | Visual C++ 2.2 | mfc30.dll | MFC 3.2 | 1995 | |
| Microsoft Visual C++ 4.0 | Visual C++ 4.0 | mfc40.dll | MFC 4.0 | 1995 | |
| Microsoft Visual C++ 4.0 | Visual C++ 4.1 | mfc40.dll | MFC 4.1 | 1996 | mfc40.dll included with Windows 95 OSR2 |
| Microsoft Visual C++ 4.0 | Visual C++ 4.2 | mfc42.dll | MFC 4.2 | 1996 | |
| Microsoft Visual C++ 5.0 | Visual C++ 5.0 | mfc42.dll | 4.21.0.7022 | March 19, 1997 | |
| Microsoft Visual C++ 5.0 | Visual C++ 5.0 SP1 | mfc42.dll | 4.21.0.7160 | July 3, 1997 | |
| Microsoft Visual C++ 5.0 | Visual C++ 5.0 SP2 | mfc42.dll | 4.21.0.7160 | August 26, 1997 | |
| Microsoft Visual C++ 5.0 | Visual C++ 5.0 SP3 | mfc42.dll | 4.21.0.7303 | December 4, 1997 | mfc42.dll included with Windows 98 |
| Microsoft Visual C++ 6.0 | Visual C++ 6.0 | mfc42.dll | 6.0.8168.0 | September 2, 1998 | |
| Microsoft Visual C++ 6.0 | Visual C++ 6.0 SP1 | mfc42.dll | 6.0.8267.0 | October 30, 1998 | |
| Microsoft Visual C++ 6.0 | Visual C++ 6.0 SP2 | mfc42.dll | 6.0.8267.0 | January 21, 1999 | |
| Microsoft Visual C++ 6.0 | Visual C++ 6.0 SP3 | mfc42.dll | 6.0.8447.0 | May 21, 1999 | |
| Microsoft Visual C++ 6.0 | Visual C++ 6.0 SP4 | mfc42.dll | 6.0.8665.0 | June 27, 2000 | |
| Microsoft Visual C++ 6.0 | Visual C++ 6.0 SP5 | mfc42.dll | 6.0.8665.0 | February 26, 2001 | |
| Microsoft Visual C++ 6.0 | Visual C++ 6.0 SP6 | mfc42.dll | 6.0.9782.0 | March 29, 2004 | |
| Microsoft Visual C++ .NET 2002 | Visual C++ .NET 2002 (Visual C++ 7.0) | mfc70.dll | 7.0.9466.0 | February 13, 2002 | |
| Microsoft Visual C++ .NET 2002 | Visual C++ .NET 2002 + MS07-012 (KB924641) | mfc70.dll | 7.0.9801.0 | February 27, 2008 | |
| Microsoft Visual C++ .NET 2002 | Visual C++ .NET 2002 SP1 | mfc70.dll | 7.0.9955.0 | March 8, 2005 | |
| Microsoft Visual C++ .NET 2002 | Visual C++ .NET 2002 SP1 + MS07-012 (KB924642) | mfc70.dll | 7.0.9975.0 | February 27, 2008 | |
| Microsoft Visual C++ .NET 2003 | Visual C++ .NET 2003 (Visual C++ 7.1) | mfc71.dll | 7.10.3077.0 | April 24, 2003 | |
| Microsoft Visual C++ .NET 2003 | Visual C++ .NET 2003 + MS07-012 (KB924643) | mfc71.dll | 7.10.5057.0 | February 27, 2008 | |
| Microsoft Visual C++ .NET 2003 | Visual C++ .NET 2003 SP1 | mfc71.dll | 7.10.6030.0 | August 15, 2006 | |
| Microsoft Visual C++ .NET 2003 | Visual C++ .NET 2003 SP1 + MS07-012 (KB927696) | mfc71.dll | 7.10.6041.0 | February 27, 2008 | |
| Microsoft Visual C++ .NET 2003 | Visual C++ .NET 2003 SP1 + MS09-035 (KB971089) | mfc71.dll | 7.10.6101.0 | July 28, 2009 | |
| Microsoft Visual C++ .NET 2003 | Visual C++ .NET 2003 SP1 + MS11-025 (KB2465373) | mfc71.dll | 7.10.6119.0 | April 12, 2011 | |
| Microsoft Visual C++ 2005 | Visual C++ 2005 (Visual C++ 8.0) | mfc80.dll | 8.0.50727.42 (included in redist 8.0.50727.42/8.0.50727.42) | April 10, 2006 | |
| Microsoft Visual C++ 2005 | Visual C++ 2005 SP1 | mfc80.dll | 8.0.50727.762 (included in redist 8.0.56336/8.0.56336) | August 27, 2007 | |
| Microsoft Visual C++ 2005 | Visual C++ 2005 SP1 + MS09-035 (KB973544) | mfc80.dll | 8.0.50727.4053 (included in redist 8.0.59192/8.0.59193) | July 28, 2009 | |
| Microsoft Visual C++ 2005 | Visual C++ 2005 SP1 + MS11-025 (KB2467175) | mfc80.dll | 8.0.50727.5592 | April 12, 2011 | |
| Microsoft Visual C++ 2005 | Visual C++ 2005 SP1 + MS11-025 (KB2538242) | mfc80.dll | 8.0.50727.6195 (included in redist 8.0.61000/8.0.61001) | June 14, 2011 | |
| Microsoft Visual C++ 2005 | Visual C++ 2005 SP1 + MS11-025 (KB2643995) | mfc80.dll | 8.0.50727.6229 | 2021-01-25? | |
| Microsoft Visual C++ 2008 | Visual C++ 2008 (Visual C++ 9.0) | mfc90.dll | 9.0.21022.8 | November 19, 2007 | |
| Microsoft Visual C++ 2008 | Visual C++ 2008 + MS09-035 (KB973551) | mfc90.dll | 9.0.21022.218 | July 28, 2009 | |
| Microsoft Visual C++ 2008 | Visual C++ 2008 Feature Pack | mfc90.dll | 9.0.30411.0 | April 7, 2008 | Refresh: April 22, 2008 |
| Microsoft Visual C++ 2008 | Visual C++ 2008 SP1 | mfc90.dll | 9.0.30729.1 | August 11, 2008 | |
| Microsoft Visual C++ 2008 | Visual C++ 2008 SP1 + MS09-035 (KB973552) | mfc90.dll | 9.0.30729.4148 | July 28, 2009 | |
| Microsoft Visual C++ 2008 | Visual C++ 2008 SP1 + MS11-025 (KB2467174) | mfc90.dll | 9.0.30729.5570 | April 12, 2011 | |
| Microsoft Visual C++ 2008 | Visual C++ 2008 SP1 + MS11-025 (KB2538243) | mfc90.dll | 9.0.30729.6161 (installer has version 9.0.30729.5677) | June 14, 2011 | |
| Microsoft Visual C++ 2010 | Visual C++ 2010 (Visual C++ 10.0) | mfc100.dll | 10.0.30319.1 | April 12, 2010 | |
| Microsoft Visual C++ 2010 | Visual C++ 2010 + MS11-025 (KB2467173) | mfc100.dll | 10.0.30319.415 | April 12, 2011 | |
| Microsoft Visual C++ 2010 | Visual C++ 2010 SP1 | mfc100.dll | 10.0.40219.1 | March 10, 2011 | |
| Microsoft Visual C++ 2010 | Visual C++ 2010 SP1 + MS11-025 (KB2565063) | mfc100.dll | 10.0.40219.325 | August 9, 2011 | |
| Microsoft Visual C++ 2012 | Visual C++ 2012 (Visual C++ 11.0) | mfc110.dll | 11.0.50727.1 | September 12, 2012 | |
| Microsoft Visual C++ 2012 | Visual C++ 2012 Update 1 | mfc110.dll | 11.0.51106.1 | November 26, 2012 | |
| Microsoft Visual C++ 2012 | Visual C++ 2012 Update 3 | mfc110.dll | 11.0.60610.1 | June 26, 2013 | |
| Microsoft Visual C++ 2012 | Visual C++ 2012 Update 4 | mfc110.dll | 11.0.61030.0 | November 13, 2013 | |
| Microsoft Visual C++ 2013 | Visual C++ 2013 (Visual C++ 12.0) | mfc120.dll | 12.0.21005.1 | October 17, 2013 | |
| Microsoft Visual C++ 2013 | Visual C++ 2013 Update 2 | mfc120.dll | 12.0.30501.0 | May 12, 2014 | |
| Microsoft Visual C++ 2013 | Visual C++ 2013 Update 5 + KB3138367 | mfc120.dll | 12.0.40649.5 | February 2016? | |
| Microsoft Visual C++ 2013 | Visual C++ 2013 Update 5 + KB3179560 | mfc120.dll | 12.0.40660.0 | July 2016? | |
| Microsoft Visual C++ 2013 | Visual C++ 2013 Update 5 + KB4032938 | mfc120.dll | 12.0.40664.0 | July 18, 2017 | |
| Microsoft Visual C++ 2015 | Visual C++ 2015 (Visual C++ 14.0) | mfc140.dll | 14.0.23026.0 | July 20, 2015 | |
| Microsoft Visual C++ 2015 | Visual C++ 2015 Update 1 | mfc140.dll | 14.0.23506.0 | November 30, 2015 | |
| Microsoft Visual C++ 2015 | Visual C++ 2015 Update 2 | mfc140.dll | 14.0.23918.0 | March 30, 2016 | |
| Microsoft Visual C++ 2015 | Visual C++ 2015 Update 3 | mfc140.dll | 14.0.24210.0 | June 27, 2016 | |
| Microsoft Visual C++ 2015 | Visual C++ 2015 Update 3 | mfc140.dll | 14.0.24212.0 | August 18, 2016 | |
| Microsoft Visual C++ 2015 | Visual C++ 2015 Update 3 + KB3165756 | mfc140.dll | 14.0.24215.1 | September 14, 2016 | |
| Microsoft Visual C++ 2015 | Visual C++ 2015 Update 3 | mfc140.dll | 14.0.24245.0 | November 13, 2018 | |
| Microsoft Visual C++ 2015 | Visual C++ 2015 Update 3 | mfc140.dll | 14.0.24247.2 | June 13, 2023 | |
| Microsoft Visual C++ 2017 | Visual C++ 15.0 | mfc140.dll | 14.10.25008.0 | March 7, 2017 | |
| Microsoft Visual C++ 2017 | Visual C++ 15.1? | mfc140.dll | 14.10.25017.0 | April 5, 2017? | |
| Microsoft Visual C++ 2017 | Visual C++ 15.2 | mfc140.dll | 14.11.25325.0 | May 10, 2017 | |
| Microsoft Visual C++ 2017 | Visual C++ 15.4 | mfc140.dll | 14.12.25810.0 | October 9, 2017 | |
| Microsoft Visual C++ 2017 | Visual C++ 15.6 | mfc140.dll | 14.13.26020.0 | March 5, 2018 | |
| Microsoft Visual C++ 2017 | Visual C++ 15.7 | mfc140.dll | 14.14.26405.0 | May 7, 2018 | |
| Microsoft Visual C++ 2017 | Visual C++ 15.7.3? | mfc140.dll | 14.14.26429.4 | May 31, 2018 | |
| Microsoft Visual C++ 2017 | Visual C++ 15.8 | mfc140.dll | 14.15.26706.0 | August 14, 2018 | |
| Microsoft Visual C++ 2017 | Visual C++ 15.9 | mfc140.dll | 14.16.27012.6 | November 13, 2018 | |
| Microsoft Visual C++ 2017 | Visual C++ 15.9.5 | mfc140.dll | 14.16.27024.1 | January 8, 2019 | |
| Microsoft Visual C++ 2017 | Visual C++ 15.9.6 | mfc140.dll | 14.16.27026.1 | January 24, 2019 | |
| Microsoft Visual C++ 2017 | Visual C++ 15.9.9 | mfc140.dll | 14.16.27027.1 | March 12, 2019 | |
| Microsoft Visual C++ 2017 | Visual C++ 15.9.15 | mfc140.dll | 14.16.27033.0 | August 13, 2019 | |
| Microsoft Visual C++ 2017 | Visual C++ 15.9.67 | mfc140.dll | 14.16.27052.0 | October 8, 2024 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.0.0 | mfc140.dll | 14.20.27508.1 | April 2, 2019 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.0.10 | mfc140.dll | 14.20.27519.0 | December 10, 2019 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.1.0 | mfc140.dll | 14.21.27702.2 | May 21, 2019 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.2.0 | mfc140.dll | 14.22.27821.0 | July 24, 2019 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.3.0 | mfc140.dll | 14.23.27820.0 | September 23, 2019 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.4.0 | mfc140.dll | 14.24.28127.4 | December 3, 2019 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.5.0 | mfc140.dll | 14.25.28508.3 | March 16, 2020 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.6.0 | mfc140.dll | 14.26.28720.3 | May 19, 2020 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.6.3 | mfc140.dll | 14.26.28808.1 | June 30, 2020 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.7.0 | mfc140.dll | 14.27.29016.0 | August 5, 2020 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.7.5 | mfc140.dll | 14.27.29112.0 | September 29, 2020 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.7.8 | mfc140.dll | 14.27.29114.0 | November 10, 2020 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.8.0 | mfc140.dll | 14.28.29325.2 | November 10, 2020 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.8.2 | mfc140.dll | 14.28.29334.0 | November 19, 2020 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.9.0 | mfc140.dll | 14.28.29910.0 | March 2, 2021 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.9.2 | mfc140.dll | 14.28.29913.0 | March 16, 2021 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.9.4 | mfc140.dll | 14.28.29914.0 | April 13, 2021 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.9.9 | mfc140.dll | 14.28.29918.0 | July 13, 2021 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.10.0 | mfc140.dll | 14.29.30037.0 | May 25, 2021 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.10.2 | mfc140.dll | 14.29.30038.0 | June 15, 2021 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.10.4 | mfc140.dll | 14.29.30040.0 | July 20, 2021 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.11.0 | mfc140.dll | 14.29.30133.0 | August 10, 2021 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.11.4 | mfc140.dll | 14.29.30135.0 | October 5, 2021 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.11.9 | mfc140.dll | 14.29.30139.0 | January 11, 2022 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.11.32 | mfc140.dll | 14.29.30153.0 | November 14, 2023 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.11.41 | mfc140.dll | 14.29.30156.0 | October 8, 2024 | |
| Microsoft Visual C++ 2019 | Visual C++ 16.11.42 | mfc140.dll | 14.29.30157.0 | November 12, 2024 | |
| Microsoft Visual C++ 2022 | Visual C++ 17.0.0RC | mfc140.dll | 14.30.30704.0 | October 13, 2021 | |
| Microsoft Visual C++ 2022 | Visual C++ 17.0.5 | mfc140.dll | 14.31.30708.0 | January 14, 2022 | |
| Microsoft Visual C++ 2022 | Visual C++ 17.1.0 | mfc140.dll | 14.31.30818.0 | October 27, 2021 | |
| Microsoft Visual C++ 2022 | Visual C++ 17.1.0 | mfc140.dll | 14.31.30919.0 | December 23, 2021 | |
| Microsoft Visual C++ 2022 | Visual C++ 17.1.0 | mfc140.dll | 14.31.31005.0 | January 26, 2022 | |
| Microsoft Visual C++ 2022 | Visual C++ 17.1.0 | mfc140.dll | 14.31.31103.0 | January 26, 2022 | |
| Microsoft Visual C++ 2022 | Visual C++ 17.2.0 | mfc140.dll | 14.32.31302.0 | March 17, 2022 | |
| Microsoft Visual C++ 2022 | Visual C++ 17.2.0 | mfc140.dll | 14.32.31326.0 | April 9, 2022 | |
| Microsoft Visual C++ 2022 | Visual C++ 17.2.5 | mfc140.dll | 14.32.31332.0 | July 1, 2022 | |
| Microsoft Visual C++ 2022 | Visual C++ 17.4.0 | mfc140.dll | 14.34.31931.0 | November 9, 2022 | |
| Microsoft Visual C++ 2022 | Visual C++ 17.4.5 | mfc140.dll | 14.34.31938.0 | February 14, 2023 | |
| Microsoft Visual C++ 2022 | Visual C++ 17.6.0 | mfc140.dll | 14.36.32532.0 | May 16, 2023 | |
| Microsoft Visual C++ 2022 | Visual C++ 17.7.1 | mfc140.dll | 14.38.32919.0 | August 11, 2023 | |
| Microsoft Visual C++ 2022 | Visual C++ 17.8.0 | mfc140.dll | 14.38.33130.0 | November 15, 2023 | |
| Microsoft Visual C++ 2022 | Visual C++ 17.8.6 | mfc140.dll | 14.38.33135.0 | February 6, 2024 | |
| Microsoft Visual C++ 2022 | Visual C++ 17.9.4 | mfc140.dll | 14.40.33617.1 | March 19, 2024 | |
| Microsoft Visual C++ 2022 | Visual C++ 17.9.4 | mfc140.dll | 14.40.33810.0 | May 1, 2024 | |
| Microsoft Visual C++ 2022 | Visual C++ 17.9.5 | mfc140.dll | 14.40.33816.0 | October 8, 2024 | |