共用方式為


The Framework

OverviewHow Do ITutorial

Your work with the Microsoft Foundation Class Library (MFC) framework is based largely on a few major classes and several Visual C++ tools. Some of the 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.

What do you want to know more about?