CRichEditView Class

With CRichEditDoc and CRichEditCntrItem, provides the functionality of the rich edit control within the context of MFC's document view architecture.

class CRichEditView : public CCtrlView

Members

Public Constructors

Name

Description

CRichEditView::CRichEditView

Constructs a CRichEditView object.

Public Methods

Name

Description

CRichEditView::AdjustDialogPosition

Moves a dialog box so that it doesn't obscure the current selection.

CRichEditView::CanPaste

Tells whether the Clipboard contains data that can be pasted into the rich edit view.

CRichEditView::DoPaste

Pastes an OLE item into this rich edit view.

CRichEditView::FindText

Finds the specified text, invoking the wait cursor.

CRichEditView::FindTextSimple

Finds the specified text.

CRichEditView::GetCharFormatSelection

Retrieves the character formatting attributes for the current selection.

CRichEditView::GetDocument

Retrieves a pointer to the related CRichEditDoc.

CRichEditView::GetInPlaceActiveItem

Retrieves the OLE item that is currently in-place active in the rich edit view.

CRichEditView::GetMargins

Retrieves the margins for this rich edit view.

CRichEditView::GetPageRect

Retrieves the page rectangle for this rich edit view.

CRichEditView::GetPaperSize

Retrieves the paper size for this rich edit view.

CRichEditView::GetParaFormatSelection

Retrieves the paragraph formatting attributes for the current selection.

CRichEditView::GetPrintRect

Retrieves the print rectangle for this rich edit view.

CRichEditView::GetPrintWidth

Retrieves the print width for this rich edit view.

CRichEditView::GetRichEditCtrl

Retrieves the rich edit control.

CRichEditView::GetSelectedItem

Retrieves the selected item from the rich edit view.

CRichEditView::GetTextLength

Retrieves the length of the text in the rich edit view.

CRichEditView::GetTextLengthEx

Retrieves the number of characters or bytes in the rich edit view. Expanded flag list for method of determining the length.

CRichEditView::InsertFileAsObject

Inserts a file as an OLE item.

CRichEditView::InsertItem

Inserts a new item as an OLE item.

CRichEditView::IsRichEditFormat

Tells whether the Clipboard contains data in a rich edit or text format.

CRichEditView::OnCharEffect

Toggles the character formatting for the current selection.

CRichEditView::OnParaAlign

Changes the alignment of paragraphs.

CRichEditView::OnUpdateCharEffect

Updates the Command UI for character public member functions.

CRichEditView::OnUpdateParaAlign

Updates the Command UI for paragraph public member functions.

CRichEditView::PrintInsideRect

Formats the specified text within the given rectangle.

CRichEditView::PrintPage

Formats the specified text within the given page.

CRichEditView::SetCharFormat

Sets the character formatting attributes for the current selection.

CRichEditView::SetMargins

Sets the margins for this rich edit view.

CRichEditView::SetPaperSize

Sets the paper size for this rich edit view.

CRichEditView::SetParaFormat

Sets the paragraph formatting attributes for the current selection.

CRichEditView::TextNotFound

Resets the internal search state of the control.

Protected Methods

Name

Description

CRichEditView::GetClipboardData

Retrieves a Clipboard object for a range in this rich edit view.

CRichEditView::GetContextMenu

Retrieves a context menu to use on a right mouse-button down.

CRichEditView::IsSelected

Indicates if the given OLE item is selected or not.

CRichEditView::OnFindNext

Finds the next occurrence of a substring.

CRichEditView::OnInitialUpdate

Refreshes a view when it is first attached to a document.

CRichEditView::OnPasteNativeObject

Retrieves native data from an OLE item.

CRichEditView::OnPrinterChanged

Sets the print characteristics to the given device.

CRichEditView::OnReplaceAll

Replaces all occurrences of a given string with a new string.

CRichEditView::OnReplaceSel

Replaces the current selection.

CRichEditView::OnTextNotFound

Handles user notification that the requested text was not found.

CRichEditView::QueryAcceptData

Queries to see about the data on the IDataObject.

CRichEditView::WrapChanged

Adjusts the target output device for this rich edit view, based on the value of m_nWordWrap.

Public Data Members

Name

Description

CRichEditView::m_nBulletIndent

Indicates the amount of indent for bullet lists.

CRichEditView::m_nWordWrap

Indicates the word wrap constraints.

Remarks

A "rich edit control" is a window in which the user can enter and edit text. The text can be assigned character and paragraph formatting, and can include embedded OLE objects. Rich edit controls provide a programming interface for formatting text. However, an application must implement any user interface components necessary to make formatting operations available to the user.

CRichEditView maintains the text and formatting characteristic of text. CRichEditDoc maintains the list of OLE client items which are in the view. CRichEditCntrItem provides container-side access to the OLE client item.

This Windows Common control (and therefore the CRichEditCtrl and related classes) is available only to programs running under Windows 95/98 and Windows NT versions 3.51 and later.

For an example of using a rich edit view in an MFC application, see the WORDPAD sample application.

Inheritance Hierarchy

CObject

CCmdTarget

CWnd

CView

CCtrlView

CRichEditView

Requirements

Header: afxrich.h

See Also

Reference

CCtrlView Class

Hierarchy Chart

CRichEditDoc Class

CRichEditCntrItem Class

Concepts

MFC Sample WORDPAD