Microsoft Foundation Class Library

[2] One quirk of MFC is the use of "Afx" as the prefix for many functions, macros and the standard precompiled header name "stdafx.h".

The name Microsoft Foundation Classes (MFC) was adopted too late in the release cycle to change these references.

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.

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