Views Samples
The SCRIBBLE tutorial sample, presented in Visual C++ Tutorials, shows how to coordinate a single CView derived class with a single CDocument derived class. Many of the other samples also use CView derived classes.
The following samples show specific techniques related to views as well as reusable CView derived classes:
-
CHKBOOK uses multiple views on the same document, in which each view is of a different CView derived class and is framed by a distinct MDI child window.
-
COLLECT and ENROLL switch between different views in the same single document interface (SDI) frame window.
-
DAOENROL tutorial sample uses record view (CDaoRecordView), which is a view laid out by a dialog template resource that displays data from a CDaoRecordset.
-
DYNABIND adds controls dynamically to the bottom of a CFormView (or CRecordView) and resizes the form.
-
ENROLL tutorial sample uses record view (CRecordView), which is a view laid out by a dialog template resource that displays data from a CRecordset.
-
MULTIPAD and SUPERPAD use an edit view (CEditView). The SUPERPAD sample is more advanced.
-
SCRIBBLE, CHKBOOK, OCLIENT, and STEP4 of ENROLL use CDocument::UpdateAllViews and the hint mechanism to inform multiple view objects about changes to a document.
-
SCRIBBLE, DRAWCLI, and CHKBOOK use a scrolling view (CScrollView).
-
VIEWEX uses a static splitter window, in which each pane is assigned to a different CView derived class.
-
VIEWEX and CHKBOOK use a form view (CFormView), which is a view laid out by a dialog template resource. VIEWEX illustrates synchronizing a form view with other views.
See Also
Microsoft Foundation Class Library Samples Index