CEditView

A CEditView object is a view that, like the CEdit class, provides the functionality of a Windows edit control and can be used to implement simple text-editor functionality. The CEditView class provides the following additional functions:

  • Printing

  • Find and replace

Because class CEditView is a derivative of class CView, objects of class CEditView can be used with documents and document templates.

Each CEditView control’s text is kept in its own global memory object. Your application can have any number of CEditView objects.

Create objects of type CEditView if you want an edit window with the added functionality listed above, or if you want simple text-editor functionality. A CEditView object can occupy the entire client area of a window. Derive your own classes from CEditView to add or modify the basic functionality, or to declare classes that can be added to a document template.

The default implementation of class CEditView handles the following commands: ID_EDIT_SELECT_ALL, ID_EDIT_FIND, ID_EDIT_REPLACE, ID_EDIT_REPEAT, and ID_FILE_PRINT.

Objects of type CEditView (or of types derived from CEditView) have the following limitations:

  • CEditView does not implement true WYSIWYG (what you see is what you get) editing. Where there is a choice between readability on the screen and matching printed output, CEditView opts for screen readability.

  • CEditView can display text in only a single font. No special character formatting is supported. See class CRichEditView for greater capabilities.

  • The amount of text a CEditView can contain is limited. The limits are the same as for the CEdit control.

For more information on CEditView, see in Visual C++ Programmer's Guide.

#include <afxext.h>

Class MembersBase ClassHierarchy Chart

Samples   

See Also   CEdit, CDocument, CDocTemplate, CCtrlView, CRichEditView