视图类 (Windows)View Classes (Windows)

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. 从派生视图类 CViewDerive your view class or classes 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.

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.

CHtmlEditViewCHtmlEditView
提供 WebBrowser HTML 编辑平台功能的窗体视图。A form view that provides the functionality of the WebBrowser HTML editing platform.

控件视图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 a collection of items, each consisting of an icon and a label, 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 a hierarchical list of icons and labels arranged in a manner similar to the left pane of File Explorer.

CSplitterWnd 允许您在单个框架窗口中具有多个视图。CSplitterWnd allows you to have multiple views within a single frame window. CPrintDialogCPrintInfo 支持视图的打印和打印预览功能。CPrintDialog and CPrintInfo support the print and print preview ability of views. CRichEditDocCRichEditCntrItem 与结合使用 CRichEditView 来实现 OLE 容器功能。CRichEditDoc and CRichEditCntrItem are used with CRichEditView to implement OLE container capabilities.

CSplitterWndCSplitterWnd
一个窗口,用户可以将其拆分为多个窗格。A window that the user can split into multiple panes. 这些窗格可以按用户或固定大小进行调整。These panes can be resizable by the user or fixed size.

CPrintDialogCPrintDialog
提供用于打印文件的标准对话框。Provides a standard dialog box for printing a file.

CPrintInfoCPrintInfo
包含打印或打印预览作业相关信息的结构。A structure containing information about a print or print preview job. 使用的 CView 打印体系结构。Used by CView's printing architecture.

CRichEditDocCRichEditDoc
维护中的 OLE 客户端项的列表 CRichEditViewMaintains the list of OLE client items that are in a CRichEditView.

CRichEditCntrItemCRichEditCntrItem
提供对存储在中的 OLE 项的客户端访问 CRichEditViewProvides client-side access to an OLE item stored in a CRichEditView.

请参阅See also

类概述Class Overview