Compartilhar via


Framework (MFC)

 

The latest version of this topic can be found at Framework (MFC).

Your work with the Microsoft Foundation Class (MFC) Library framework is based largely on a few major classes and several Visual C++ tools. Some classes encapsulate a large portion of the Win32 application programming interface (API). Other classes encapsulate application concepts such as documents, views, and the application itself. Still others encapsulate OLE features and ODBC and DAO data-access functionality.

For example, Win32's concept of window is encapsulated by MFC class CWnd. That is, a C++ class called CWnd encapsulates or "wraps" the HWND handle that represents a Windows window. Likewise, class CDialog encapsulates Win32 dialog boxes.

Encapsulation means that the C++ class CWnd, for example, contains a member variable of type HWND, and the class's member functions encapsulate calls to Win32 functions that take an HWND as a parameter. The class member functions typically have the same name as the Win32 function they encapsulate.

In This Section

SDI and MDI

Documents, Views, and the Framework

Wizards and Resource Editors

Building on the Framework

How the Framework Calls Your Code

CWinApp: The Application Class

Document Templates and the Document/View Creation Process

Message Handling and Mapping

Window Objects

See Also

Using the Classes to Write Applications for Windows