Export (0) Print
Expand All

The Framework 

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

In Related Sections

See Also

Community Additions

© 2015 Microsoft