Introduction to Microsoft Foundation Classes (MFCs)

Microsoft Foundation Classes are a set of classes that can be used in building applications. These classes form a library that saves the developer’s time from writing the program code that has already been written. The significant thing of the Microsoft Foundation Class Library is the encapsulation of a large portion of the Windows Application Programming Interface (API) in C++ form. When we refer to Microsoft Foundation Classes Library we mean the classes that represent windows, dialog boxes, device contexts, and common Graphics Devices Interface (GDI) objects such as brushes and pens, controls, and other standard Windows items.

Apart from this, Microsoft Foundation Classes Library works as an application framework for Windows that provides toolbars, status bars, printing, print view, database support, and ActiveX support. The objectives or services of Microsoft Foundation Classes include serialization, runtime class information, and compatibility with collection classes.

Microsoft Foundation Classes can be categorized into ten classes. They are Root class, MFC Application architecture classes, Window Dialog and Control Classes, Drawing and Printing classes, Simple Data Type classes, Arrays, List and Map classes, File and Database classes, Internet and Networking classes, OLE classes, and Debugging and Exception classes. CObject is the base class or the mother of all Microsoft Foundation Classes. CObject provides various useful capabilities to all the classes derived from it, with very low overhead. CRuntime class does not have any base class. CRuntime class is used to obtain information about an object or its base class at runtime.

MFC application framework classes are used to build applications. They provide functionality common to most applications. All MFC applications have at least two objects: an application object and a window object. Windows Dialog and Control classes have CWnd as their base class. Cwnd can be used by itself or as a base to derive new classes. In Drawing and Printing classes, Microsoft Foundation Classes provides a set of classes to encapsulate various types of device context and drawing tools such as pens, palettes, bitmaps, and brushes. Simple Data Type classes encapsulate data types provided by OLE. These data types can be used for windows programming.

Microsoft Foundation Classes provide a collection of classes for arrays, lists, and maps that holds variety of object and predefined types. These classes can be used for any programming. File and database classes allows you to store information to a database or a disk file. Internet and Networking classes allows you to exchange information within a network using ISAPI or Windows Socket. OLE classes work with other application classes and provide access to the power of ActiveX API. The debugging and exception classes allows you to debug dynamic memory allocation and for transferring exceptional information.

| What is Private Access Modifier in C#? | What is Protected Access Modifier in C#? | What is Protected Internal Access Modifier in C#? | What is Public Access Modifier in C#? | What is the difference between virtual and abstract keywords in .NET? | What is the importance of Microsoft Application Blocks in .NET Architecture? | What is the need for Factory Method in C# | What is the purpose of ArrayList in .NET? | What is the purpose of Datareader in ADO.NET? | What is the purpose of Dataset in ADO.NET? | What is the purpose of finally block in C#? | What is the purpose of interlocked class in .NET? | What is the purpose of main() function in C# | What is the purpose of ManualResetEvent in .NET? | What is the purpose of sealed method in C#? | What is the purpose of Thread.Join() method in .NET? | What is the purpose of Thread.Sleep() method in .NET? | What is the purpose of throw keyword in C#? | What is the usage of ENUM in .NET? |

“Amazon and the Amazon logo are trademarks of, Inc. or its affiliates.”

| Privacy Policy for | Disclosure | Contact |

Copyright - © 2004 - 2024 - All Rights Reserved.