Skip to content

Latest commit

 

History

History
40 lines (24 loc) · 2.33 KB

framework-mfc.md

File metadata and controls

40 lines (24 loc) · 2.33 KB
description title ms.date helpviewer_keywords ms.assetid
Learn more about: Framework (MFC)
Framework (MFC)
09/17/2019
encapsulation [MFC], Win32 API
MFC, application framework
wrapper classes [MFC], explained
Win32 [MFC], API encapsulation by MFC
application framework [MFC], about MFC application framework
APIs [MFC], encapsulation by MFC Win32
encapsulation [MFC]
Windows API [MFC], encapsulation by MFC
encapsulated Win32 API [MFC]
3be0fec8-9843-4119-ae42-ece993ef500b

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. (DAO is supported through Office 2013. DAO 3.6 is the final version, and it is considered obsolete.)

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

In Related Sections

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