视图类(体系结构)View Classes (Architecture)

CView 及其派生类是表示框架窗口的工作区的子窗口。CView and its derived classes are child windows that represent the client area of a frame window. 视图显示数据并接受文档输入。Views show data and accept input for a document.

视图类与文档类和框架窗口类关联,使用文档模板对象。A view class is associated with a document class and a frame window class using a document-template object.

CViewCView
文档数据的应用程序特定视图的基类。The base class for application-specific views of a document's data. 视图显示数据并接受用户输入以编辑或选择数据。Views display data and accept user input to edit or select the data. (es) 派生视图类 CViewDerive your view class(es) from CView.

CScrollViewCScrollView
具有滚动功能的视图的基类。The base class for views with scrolling capabilities. 从派生您的视图类 CScrollView 以便自动滚动。Derive your view class from CScrollView for automatic scrolling.

窗体和记录视图Form and Record Views

窗体视图还会滚动查看。Form views are also scrolling views. 它们基于对话框模板。They are based on a dialog box template.

记录视图派生自窗体视图。Record views are derived from form views. 除了对话框模板以外,它们还具有到数据库的连接。In addition to the dialog box template, they also have a connection to a database.

CFormViewCFormView
其布局在对话框模板中定义的滚动视图。A scroll view whose layout is defined in a dialog box template. 从派生一个类 CFormView ,以实现基于对话框模板的用户界面。Derive a class from CFormView to implement a user interface based on a dialog box template.

CDaoRecordViewCDaoRecordView
提供直接连接到 (DAO) recordset 对象的数据访问对象的窗体视图。Provides a form view directly connected to a Data Access Object (DAO) recordset object. 与所有窗体视图一样, CDaoRecordView 是基于对话框模板的。Like all form views, a CDaoRecordView is based on a dialog box template. DAO 与 Access 数据库结合使用,并受 Office 2013 的支持。DAO is used with Access databases and is supported through Office 2013. DAO 3.6 是最终版本,被视为已过时。DAO 3.6 is the final version, and it is considered obsolete.

CHtmlViewCHtmlView
支持应用程序中的 Web 浏览控件。Supports a control for Web browsing within an application. 控件支持 MFC 中的动态 HTML。The control supports dynamic HTML in MFC.

COLEDBRecordViewCOLEDBRecordView
为窗体视图提供 MFC OLE DB 支持。Provides MFC OLE DB support for form views.

CRecordViewCRecordView
提供直接连接到开放式数据库连接 (ODBC) recordset 对象的窗体视图。Provides a form view directly connected to an Open Database Connectivity (ODBC) recordset object. 与所有窗体视图一样, CRecordView 是基于对话框模板的。Like all form views, a CRecordView is based on a dialog box template.

控件视图Control Views

控件视图将控件显示为其视图。Control views display a control as their view.

CCtrlViewCCtrlView
与 Windows 控件关联的所有视图的基类。The base class for all views associated with Windows controls. 下面介绍了基于控件的视图。The views based on controls are described below.

CEditViewCEditView
包含 Windows 标准编辑控件的视图 (参阅 CEdit) 。A view that contains a Windows standard edit control (see CEdit). 编辑控件支持文本编辑、搜索、替换和滚动功能。Edit controls support text editing, searching, replacing, and scrolling capabilities.

CRichEditViewCRichEditView
包含 Windows rich edit 控件的视图 (参阅 CRichEditCtrl) 。A view that contains a Windows rich edit control (see CRichEditCtrl). 除了编辑控件的功能外,丰富的编辑控件还支持字体、颜色、段落格式和嵌入的 OLE 对象。In addition to the capabilities of an edit control, rich edit controls support fonts, colors, paragraph formatting, and embedded OLE objects.

CListViewCListView
包含 Windows 列表控件的视图 (参阅 CListCtrl) 。A view that contains a Windows list control (see CListCtrl). 列表控件以类似于文件资源管理器右窗格的方式显示图标和字符串。A list control displays icons and strings in a manner similar to the right pane of File Explorer.

CTreeViewCTreeView
包含 Windows 树控件的视图 (参阅 CTreeCtrl) 。A view that contains a Windows tree control (see CTreeCtrl). 树形控件以与文件资源管理器左窗格类似的方式显示在层次结构中排列的图标和字符串。A tree control displays icons and strings arranged in a hierarchy in a manner similar to the left pane of File Explorer.

请参阅See also

类概述Class Overview