Microsoft Foundation Classes

Microsoft Foundation Classes, or MFC, is a Microsoft library that wraps portions of the Windows API in C++ classes, forming an application framework. Classes are defined for many of the handle-managed Windows objects and also for predefined windows and common controls.

MFC was introduced in 1992 with Microsoft's C/C++ 7.0 compiler for use with 16-bit versions of Windows. It was part of an overall Microsoft effort to gain market share for development tools, and was designed to be something of a showcase of the capabilities of the C++ programming language. C++ was just beginning to replace C for development of commercial application software and C/C++ 7.0 was the first of Microsoft's compilers to add C++ support. MFC was inspired by, and owes much of its structure to the Think Class Library (TCL) on Macintosh, later bought by Symantec.

The Object Windows Library (OWL) was a competing product introduced by Borland around the same time, and was designed for Borland's Turbo C compiler. Since it more strictly followed some OO design guidelines, OWL was more popular than MFC for a time. However, it lost market share when OWL updates lagged the addition of new features to Windows, and when Borland released a new version of the framework incompatible with earlier editions. It was discontinued as Borland began licensing MFC from Microsoft.

When MFC was introduced, Microsoft extended the C++ syntax with a series of macros for management of windows messages, exceptions, and dynamic class instantiation. The syntactic changes for windows messages were intended to reduce memory required by avoiding gratuitous vtable use and provide a more concrete structure for various Visual C++-supplied tools to edit and manipulate code without parsing the full language. The message-handing macros replaced virtual function mechanism provided by C++. Because some versions of the macros defeated the type checking done by the compiler, their use has been a fruitful source of bugs for users of MFC. The macros which implemented serialization, exception support, and dynamic runtime types were less problematic, and predated availability of standards-based language extensions by a number of years. 32-bit versions of MFC, for Windows NT 3.1 and later Windows operating systems, retained these features in the interest of compatibility.

As a practical matter, the chief advantage of MFC is that it provides an object-oriented programming model to the Windows APIs. Another advantage of MFC are C++ wrapper types for many common Windows resource-related data types that provide automatic closure of handles when the objects creating them go out of scope. Additionally, MFC provides a Document/View framework for creating Model-View-Controller-based architectures.

Once highly promoted by Microsoft, emphasis on MFC has been eclipsed by a number of other technologies. Microsoft placed more emphasis on Visual Basic as a commercial software development tool as it became clear that C++ and MFC were too complex for many programmers. Windows Forms is the .NET RAD successor to Visual Basic and MFC. Native C++ programs can use Windows Forms by adding C++ Managed Extensions.

MFC continues to be used for new development by shops that have made a strategic commitment to C++ and the Windows platform.

External links

de:Microsoft Foundation Classes fr:Microsoft foundation class zh:MFC he:Microsoft Foundation Classes

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools