Home | Overview | How Do I | Sample | Tutorial
The following table shows MFC's view classes and their relationships to one another. The capabilities of your view class depend on the MFC view class from which it derives.
View Classes
Class | Description |
CView | Base class of all views. |
CCtrlView | Base class of CTreeView, CListView, CEditView, and CRichEditView. These classes let you use document/view architecture with the indicated Windows common controls. |
CEditView | A simple view based on the Windows edit box control. Allows entering and editing text and can be used as the basis for a simple text editor application. See also CRichEditView. |
CRichEditView | A view containing a CRichEditCtrl object. This class is analogous to CEditView, but unlike CEditView, CRichEditView handles formatted text. |
CListView | A view containing a CListCtrl object. |
CTreeView | A view containing a CTreeCtrl object, for views that resemble the Workspace window in Visual C++. |
CScrollView | Base class of CFormView, CRecordView, and CDaoRecordView. Implements scrolling the view's contents. |
CFormView | A form view, a view that contains controls. A forms-based application provides one or more such form interfaces, as do the AppWizards. |
CHtmlView | A Web browser view with which the application's user can browse sites on the World Wide Web, as well as folders in the local file system and on a network. The Web browser view can also work as an Active document container. |
CRecordView | A form view that displays ODBC database records in controls. If you select ODBC support in your project, the view's base class is CRecordView. The view is connected to a CRowset object. |
CDaoRecordView | A form view that displays DAO database records in controls. If you select DAO support in your project, the view's base class is CDaoRecordView. The view is connected to a CDaoRecordset object. |
COleDBRecordView | A form view that displays OLE DB records in controls. If you select OLE DB support in your project, the view's base class is COleDBRecordView. The view is connected to a CRowset object. Note that COleDBRecordView is not currently supported by ClassWizard, nor by the New Class nor New Form commands on the Insert menu. |
Note As of MFC version 4.0, CEditView is derived from CCtrlView.
To use these classes in your application, derive the application's view classes from them. For related information, see Scrolling and Scaling Views. For more information on the database classes, see Databases: Overview.