Using the Classes to Write Applications for Windows
| Overview | How Do I | | Tutorial
Taken together, the classes in the Microsoft Foundation Class Library (MFC) make up an "application framework" — the framework on which you build an application for Windows. At a very general level, the framework defines the skeleton of an application and supplies standard user-interface implementations that can be placed onto the skeleton. Your job as programmer is to fill in the rest of the skeleton — those things that are specific to your application. You can get a head start by using AppWizard to create the files for a very thorough starter application. You use the Microsoft Visual C++™ resource editors to design your user-interface elements visually, ClassWizard to connect those elements to code, and the class library to implement your application-specific logic.
Version 3.0 and later of the MFC framework supports 32-bit programming for Win32 platforms, including Microsoft Windows 95 and Microsoft Windows NT version 3.51 and later. MFC Win32 support includes multithreading. Use version 1.5x if you need to do 16-bit programming.
This family of articles presents a broad overview of the application framework. It also explores the major objects that make up your application and how they are created. Among the topics covered in these articles are the following:
Division of labor between the framework and your code, as described in Building on the Framework
The application class, which encapsulates application-level functionality
How document templates create and manage documents and their associated views and frame windows
Class CWnd, the root base class of all windows
Graphic objects, such as pens and brushes
Other parts of the framework story include:
Memory Management with MFC: Overview
Besides giving you a considerable head start in writing applications for Windows, MFC also makes it much easier to write applications that specifically use OLE linking and embedding technology. You can make your application an OLE visual editing container, an OLE visual editing server, or both, and you can add Automation so that other applications can use objects from your application or even drive it remotely.
-
The OLE control development kit (CDK) is now fully integrated with the framework. This article family supplies an overview of ActiveX control development with MFC. (ActiveX controls were formerly known as OLE controls.)
-
MFC also supplies two sets of database classes that simplify writing data-access applications. Using the ODBC database classes, you can connect to databases via an Open Database Connectivity (ODBC) driver, select records from tables, and display record information in an on-screen form. Using the Data Access Object (DAO) classes, you can work with databases via the Microsoft Jet database engine or external (non-Jet) data sources, including ODBC data sources.
In addition, MFC is fully enabled for writing applications that use Unicode™ and multibyte character sets (MBCS), specifically double-byte character sets (DBCS).
For a step-by-step tutorial in which you build an application with the framework, read the .
For a general guide to MFC documentation, see the topic MFC: Overview.