MFC 桌面应用程序MFC Desktop Applications

Microsoft 基础类 (MFC) 库针对大部分 Win32 和 COM API 提供面向对象的包装器。The Microsoft Foundation Class (MFC) Library provides an object-oriented wrapper over much of the Win32 and COM APIs. 虽然此包装器可用于创建极为简单的桌面应用程序,但当你需要开发具有多个控件的更复杂的用户界面时,此包装器将最为有用。Although it can be used to create very simple desktop applications, it is most useful when you need to develop more complex user interfaces with multiple controls. 可以使用 MFC 创建带有 Office 样式用户界面的应用程序。You can use MFC to create applications with Office-style user interfaces. 有关 Windows 平台本身的文档,请参阅 windows 文档For documentation on the Windows platform itself, see Windows documentation. 有关使用 c + + 生成 Windows 应用程序的信息,请参阅 使用 Win32 API 生成桌面 windows 应用For information on building Windows applications in C++ without MFC, see Build desktop Windows apps using the Win32 API.

“MFC 参考”介绍了构成 Microsoft 基础类库的类、全局函数、全局变量和宏。The MFC Reference covers the classes, global functions, global variables, and macros that make up the Microsoft Foundation Class Library.

每个类包含的各个层次结构图表在定位基类时很有用。The individual hierarchy charts included with each class are useful for locating base classes. “MFC 参考”通常不说明继承的成员函数或继承的运算符。The MFC Reference usually does not describe inherited member functions or inherited operators. 有关这些函数的信息,请参见层次结构关系图中描述的基类。For information on these functions, refer to the base classes depicted in the hierarchy diagrams.

有关每个类的文档包括类概述、成员摘要(按类别)以及有关成员函数、重载运算符和数据成员的主题。The documentation for each class includes a class overview, a member summary by category, and topics for the member functions, overloaded operators, and data members.

仅记录通常用于应用程序或派生类的公共类成员和受保护类成员。Public and protected class members are documented only when they are normally used in application programs or derived classes. 有关类成员的完整列表,请参见类头文件。See the class header files for a complete listing of class members.


MFC 类及其成员不能在 Windows 运行时环境中执行的应用程序中使用。The MFC classes and their members cannot be used in applications that execute in the Windows Runtime environment.

用于多字节字符编码 (MBCS) 的 MFC 库 (DLL) 不再包含于 Visual Studio 中,但可用作 Visual Studio 加载项。MFC libraries (DLLs) for multibyte character encoding (MBCS) are no longer included in Visual Studio, but are available as a Visual Studio add-on. 有关详细信息,请参阅 MFC MBCS DLL 加载项For more information, see MFC MBCS DLL Add-on.

本节内容In This Section

有关 MFC 主题的概念文章。Conceptual articles on MFC topics.

层次结构图Hierarchy Chart
形象说明类库中的类关系。Visually details the class relationships in the class library.

类概述Class Overview
按类别列出 MFC 库中的类。Lists the classes in the MFC Library according to category.

包含带领你完成与 MFC 库功能关联的各种任务的文章。Contains articles that walk you through various tasks associated with MFC library features.

技术说明Technical Notes
提供 MFC 开发团队针对类库编写的专门主题的链接。Provides links to specialized topics, written by the MFC development team, on the class library.

MFC 自定义Customization for MFC
提供有关自定义 MFC 应用程序的一些提示。Provides some tips for customizing your MFC application.

提供 MFC 类的链接和有关 MFC 类的头文件信息。Provides links to and header file information for the MFC classes.

内部类Internal Classes
MFC 内部使用。Used internally in MFC. 为了保持完整性,本节将说明这些内部类,但这些内部类不在代码中直接使用。For completeness, this section describes these internal classes, but they are not intended to be used directly in your code.

MFC 宏和全局函数Macros and Globals
提供 MFC 库中的宏和全局函数的链接。Provides links to the macros and global functions in the MFC Library.

结构、样式、回调和消息映射Structures, Styles, Callbacks, and Message Maps
提供 MFC 库所使用的结构、样式、回调和消息映射的链接。Provides links to the structures, styles, callbacks, and message maps used by the MFC Library.

MFC 向导和对话框MFC Wizards and Dialog Boxes
Visual Studio 中用于创建 MFC 应用程序的功能的指南。A guide to the features in Visual Studio for creating MFC applications.

使用资源文件Working with Resource Files
如何使用资源文件管理静态用户界面数据,如 UI 字符串和对话框布局。How to use resource files to manage static user interface data such as UI strings and dialog box layout.

层次结构图类别Hierarchy Chart Categories
按类别说明 MFC 层次结构图表。Describes the MFC hierarchy chart by category.

ATL/MFC 共享类ATL/MFC Shared Classes
提供 MFC 与 ATL 共享的类的链接。Provides links to classes that are shared between MFC and ATL.

MFC 示例MFC Samples
提供演示如何使用 MFC 的示例的链接。Provides links to samples that demonstrate how to use MFC.

Visual C++ 库参考Visual C++ Libraries Reference
提供 Visual C++ 附带的各种库链接,其中包括 ATL、MFC、OLE DB 模板、C 运行时库和 C++ 标准库。Provides links to the various libraries provided with Visual C++, including ATL, MFC, OLE DB Templates, the C run-time library, and the C++ Standard Library.

在 Visual Studio 中进行调试Debugging in Visual Studio
提供一些链接,所涉及内容为使用 Visual Studio 调试器纠正应用程序或存储过程中的逻辑错误。Provides links to using the Visual Studio debugger to correct logic errors in your application or stored procedures.

请参阅See also