description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Learn more about: CRichEditView Class |
CRichEditView Class |
11/04/2016 |
|
|
bd576b10-4cc0-4050-8f76-e1a0548411e4 |
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
Name | Description |
---|---|
CRichEditView::CRichEditView | Constructs a CRichEditView object. |
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. |
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 . |
Name | Description |
---|---|
CRichEditView::m_nBulletIndent | Indicates the amount of indent for bullet lists. |
CRichEditView::m_nWordWrap | Indicates the word wrap constraints. |
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.
CRichEditView
Header: afxrich.h
Call this function to move the given dialog box so that it does not obscure the current selection.
void AdjustDialogPosition(CDialog* pDlg);
pDlg
Pointer to a CDialog
object.
Call this function to determine if the Clipboard contains information that can be pasted into this rich edit view.
BOOL CanPaste() const;
Nonzero if the Clipboard contains data in a format which this rich edit view can accept; otherwise, 0.
Call this function to create a CRichEditView
object.
CRichEditView();
Call this function to paste the OLE item in dataobj into this rich edit document/view.
void DoPaste(
COleDataObject& dataobj,
CLIPFORMAT cf,
HMETAFILEPICT hMetaPict);
dataobj
The COleDataObject containing the data to paste.
cf
The desired Clipboard format.
hMetaPict
The metafile that represents the item to be pasted.
The framework calls this function as part of the default implementation of QueryAcceptData.
This function determines the type of paste based on the results of the handler for Paste Special. If cf is 0, the new item uses the current iconic representation. If cf is nonzero and hMetaPict is not NULL, the new item uses hMetaPict for its representation.
Call this function to find the specified text and set it to be the current selection.
BOOL FindText(
LPCTSTR lpszFind,
BOOL bCase = TRUE,
BOOL bWord = TRUE,
BOOL bNext = TRUE);
lpszFind
Contains the string to search for.
bCase
Indicates if the search is case sensitive.
bWord
Indicates if the search should match whole words only, not parts of words.
bNext
Indicates the direction of the search. If TRUE, the search direction is toward the end of the buffer. If FALSE, the search direction is toward the beginning of the buffer.
Nonzero if the lpszFind text is found; otherwise 0.
This function displays the wait cursor during the find operation.
[!code-cppNVC_MFCDocView#151]
Call this function to find the specified text and set it to be the current selection.
BOOL FindTextSimple(
LPCTSTR lpszFind,
BOOL bCase = TRUE,
BOOL bWord = TRUE,
BOOL bNext = TRUE);
lpszFind
Contains the string to search for.
bCase
Indicates if the search is case sensitive.
bWord
Indicates if the search should match whole words only, not parts of words.
bNext
Indicates the direction of the search. If TRUE, the search direction is toward the end of the buffer. If FALSE, the search direction is toward the beginning of the buffer.
Nonzero if the lpszFind text is found; otherwise 0.
See the example for CRichEditView::FindText.
Call this function to get the character formatting attributes of the current selection.
CHARFORMAT2& GetCharFormatSelection();
A CHARFORMAT2 structure which contains the character formatting attributes of the current selection.
For more information, see the EM_GETCHARFORMAT message and the CHARFORMAT2 structure in the Windows SDK.
[!code-cppNVC_MFCDocView#152]
The framework calls this function as part of the processing of IRichEditOleCallback::GetClipboardData.
virtual HRESULT GetClipboardData(
CHARRANGE* lpchrg,
DWORD dwReco,
LPDATAOBJECT lpRichDataObj,
LPDATAOBJECT* lplpdataobj);
lpchrg
Pointer to the CHARRANGE structure specifying the range of characters (and OLE items) to copy to the data object specified by lplpdataobj.
dwReco
Clipboard operation flag. Can be one of these values.
-
RECO_COPY Copy to the Clipboard.
-
RECO_CUT Cut to the Clipboard.
-
RECO_DRAG Drag operation (drag and drop).
-
RECO_DROP Drop operation (drag and drop).
-
RECO_PASTE Paste from the Clipboard.
lpRichDataObj
Pointer to an IDataObject object containing the Clipboard data from the rich edit control ( IRichEditOle::GetClipboardData).
lplpdataobj
Pointer to the pointer variable that receives the address of the IDataObject
object representing the range specified in the lpchrg parameter. The value of lplpdataobj is ignored if an error is returned.
An HRESULT value reporting the success of the operation. For more information on HRESULT, see Structure of COM Error Codes in the Windows SDK.
If the return value indicates success, IRichEditOleCallback::GetClipboardData
returns the IDataObject
accessed by lplpdataobj; otherwise, it returns the one accessed by lpRichDataObj. Override this function to supply your own Clipboard data. The default implementation of this function returns E_NOTIMPL.
This is an advanced overridable.
For more information, see IRichEditOle::GetClipboardData, IRichEditOleCallback::GetClipboardData, and CHARRANGE in the Windows SDK and see IDataObject in the Windows SDK.
The framework calls this function as part of the processing of IRichEditOleCallback::GetContextMenu.
virtual HMENU GetContextMenu(
WORD seltyp,
LPOLEOBJECT lpoleobj,
CHARRANGE* lpchrg);
seltyp
The selection type. The selection type values are described in the Remarks section.
lpoleobj
Pointer to a OLEOBJECT
structure specifying the first selected OLE object if the selection contains one or more OLE items. If the selection contains no items, lpoleobj is NULL. The OLEOBJECT
structure holds a pointer to an OLE object v-table.
lpchrg
Pointer to a CHARRANGE structure containing the current selection.
Handle to the context menu.
This function is a typical part of right mouse-button down processing.
The selection type can be any combination of the following flags:
-
SEL_EMPTY Indicates that there is no current selection.
-
SEL_TEXT Indicates that the current selection contains text.
-
SEL_OBJECT Indicates that the current selection contains at least one OLE item.
-
SEL_MULTICHAR Indicates that the current selection contains more than one character of text.
-
SEL_MULTIOBJECT Indicates that the current selection contains more than one OLE object.
The default implementation returns NULL. This is an advanced overridable.
For more information, see IRichEditOleCallback::GetContextMenu and CHARRANGE in the Windows SDK.
Call this function to get a pointer to the CRichEditDoc
associated with this view.
CRichEditDoc* GetDocument() const;
Pointer to a CRichEditDoc object associated with your CRichEditView
object.
Call this function to get the OLE item that is currently activated in place in this CRichEditView
object.
CRichEditCntrItem* GetInPlaceActiveItem() const;
A pointer to the single, in-place active CRichEditCntrItem object in this rich edit view; NULL if there is no OLE item currently in the in-place active state.
Call this function to retrieve the current margins used in printing.
CRect GetMargins() const;
The margins used in printing, measured in MM_TWIPS.
Call this function to get the dimensions of the page used in printing.
CRect GetPageRect() const;
The bounds of the page used in printing, measured in MM_TWIPS.
This value is based on the paper size.
Call this function to retrieve the current paper size.
CSize GetPaperSize() const;
The size of the paper used in printing, measured in MM_TWIPS.
[!code-cppNVC_MFCDocView#153]
Call this function to get the paragraph formatting attributes of the current selection.
PARAFORMAT2& GetParaFormatSelection();
A PARAFORMAT2 structure which contains the paragraph formatting attributes of the current selection.
For more information, see EM_GETPARAFORMAT message and PARAFORMAT2 structure in the Windows SDK.
Call this function to retrieve the bounds of the printing area within the page rectangle.
CRect GetPrintRect() const;
The bounds of the image area used in printing, measured in MM_TWIPS.
[!code-cppNVC_MFCDocView#154]
Call this function to determine the width of the printing area.
int GetPrintWidth() const;
The width of the printing area, measured in MM_TWIPS.
Call this function to retrieve the CRichEditCtrl object associated with the CRichEditView
object.
CRichEditCtrl& GetRichEditCtrl() const;
The CRichEditCtrl
object for this view.
See the example for CRichEditView::FindText.
Call this function to retrieve the OLE item (a CRichEditCntrItem
object) currently selected in this CRichEditView
object.
CRichEditCntrItem* GetSelectedItem() const;
Pointer to a CRichEditCntrItem object selected in the CRichEditView
object; NULL if no item is selected in this view.
Call this function to retrieve the length of the text in this CRichEditView
object.
long GetTextLength() const;
The length of the text in this CRichEditView
object.
Call this member function to calculate the length of the text in this CRichEditView
object.
long GetTextLengthEx(
DWORD dwFlags,
UINT uCodePage = -1) const;
dwFlags
Value specifying the method to be used in determining the text length. This member can be one or more of the values listed in the flags member of GETTEXTLENGTHEX described in the Windows SDK.
uCodePage
Code page for translation (CP_ACP for ANSI Code Page, 1200 for Unicode).
The number of characters or bytes in the edit control. If incompatible flags were set in dwFlags, this member function returns E_INVALIDARG.
GetTextLengthEx
provides additional ways of determining the length of the text. It supports the Rich Edit 2.0 functionality. For more information, see About Rich Edit Controls in the Windows SDK.
Call this function to insert the specified file (as a CRichEditCntrItem object) into a rich edit view.
void InsertFileAsObject(LPCTSTR lpszFileName);
lpszFileName
String containing the name of the file to be inserted.
Call this function to insert a CRichEditCntrItem object into a rich edit view.
HRESULT InsertItem(CRichEditCntrItem* pItem);
pItem
Pointer to the item to be inserted.
An HRESULT value indicating the success of the insertion.
For more information on HRESULT, see Structure of COM Error Codes in the Windows SDK.
Call this function to determine if cf is a Clipboard format which is text, rich text, or rich text with OLE items.
static BOOL AFX_CDECL IsRichEditFormat(CLIPFORMAT cf);
cf
The Clipboard format of interest.
Nonzero if cf is a rich edit or text Clipboard format.
Call this function to determine if the specified OLE item is currently selected in this view.
virtual BOOL IsSelected(const CObject* pDocItem) const;
pDocItem
Pointer to an object in the view.
Nonzero if the object is selected; otherwise 0.
Override this function if your derived view class has a different method for handling selection of OLE items.
The indentation for bullet items in a list; by default, 720 units, which is 1/2 inch.
int m_nBulletIndent;
Indicates the type of word wrap for this rich edit view.
int m_nWordWrap;
One of the following values:
-
WrapNone
Indicates no automatic word wrapping. -
WrapToWindow
Indicates word wrapping based on the width of the window. -
WrapToTargetDevice
Indicates word wrapping based on the characteristics of the target device.
See the example for CRichEditView::WrapChanged.
Call this function to toggle the character formatting effects for the current selection.
void OnCharEffect(
DWORD dwMask,
DWORD dwEffect);
dwMask
The character formatting effects to modify in the current selection.
dwEffect
The desired list of character formatting effects to toggle.
Each call to this function toggles the specified formatting effects for the current selection.
For more information on the dwMask and dwEffect parameters and their potential values, see the corresponding data members of CHARFORMAT in the Windows SDK.
[!code-cppNVC_MFCDocView#155]
Called by the framework when processing commands from the Find/Replace dialog box.
virtual void OnFindNext(
LPCTSTR lpszFind,
BOOL bNext,
BOOL bCase,
BOOL bWord);
lpszFind
The string to find.
bNext
The direction to search: TRUE indicates down; FALSE, up.
bCase
Indicates whether the search is to be case sensitive.
bWord
Indicates whether the search is to match whole words only or not.
Call this function to find text within the CRichEditView
. Override this function to alter search characteristics for your derived view class.
Called by the framework after the view is first attached to the document, but before the view is initially displayed.
virtual void OnInitialUpdate();
The default implementation of this function calls the CView::OnUpdate member function with no hint information (that is, using the default values of 0 for the lHint parameter and NULL for the pHint parameter). Override this function to perform any one-time initialization that requires information about the document. For example, if your application has fixed-sized documents, you can use this function to initialize a view's scrolling limits based on the document size. If your application supports variable-sized documents, use OnUpdate
to update the scrolling limits every time the document changes.
See the example for CRichEditView::m_nWordWrap.
Use this function to load native data from an embedded item.
virtual BOOL OnPasteNativeObject(LPSTORAGE lpStg);
lpStg
Pointer to an IStorage object.
Nonzero if successful; otherwise, 0;
Typically, you would do this by creating a COleStreamFile around the IStorage
. The COleStreamFile
can be attached to an archive and CObject::Serialize called to load the data.
This is an advanced overridable.
For more information, see IStorage in the Windows SDK.
Call this function to change the paragraph alignment for the selected paragraphs.
void OnParaAlign(WORD wAlign);
wAlign
Desired paragraph alignment. One of the following values:
-
PFA_LEFT Align the paragraphs with the left margin.
-
PFA_RIGHT Align the paragraphs with the right margin.
-
PFA_CENTER Center the paragraphs between the margins.
[!code-cppNVC_MFCDocView#156]
Override this function to change characteristics for this rich edit view when the printer changes.
virtual void OnPrinterChanged(const CDC& dcPrinter);
dcPrinter
A CDC object for the new printer.
The default implementation sets the paper size to the physical height and width for the output device (printer). If there is no device context associated with dcPrinter, the default implementation sets the paper size to 8.5 by 11 inches.
Called by the framework when processing Replace All commands from the Replace dialog box.
virtual void OnReplaceAll(
LPCTSTR lpszFind,
LPCTSTR lpszReplace,
BOOL bCase,
BOOL bWord);
lpszFind
The text to be replaced.
lpszReplace
The replacement text.
bCase
Indicates if the search is case sensitive.
bWord
Indicates if the search must select whole words or not.
Call this function to replace all occurrences of some given text with another string. Override this function to alter search characteristics for this view.
See the example for CRichEditView::FindText.
Called by the framework when processing Replace commands from the Replace dialog box.
virtual void OnReplaceSel(
LPCTSTR lpszFind,
BOOL bNext,
BOOL bCase,
BOOL bWord,
LPCTSTR lpszReplace);
lpszFind
The text to be replaced.
bNext
Indicates the direction of the search: TRUE is down; FALSE, up.
bCase
Indicates if the search is case sensitive.
bWord
Indicates if the search must select whole words or not.
lpszReplace
The replacement text.
Call this function to replace one occurrence of some given text with another string. Override this function to alter search characteristics for this view.
Called by the framework whenever a search fails.
virtual void OnTextNotFound(LPCTSTR lpszFind);
lpszFind
The text which was not found.
Override this function to change the output notification from a MessageBeep.
For more information, see MessageBeep in the Windows SDK.
[!code-cppNVC_MFCDocView#157]
The framework calls this function to update the command UI for character effect commands.
void OnUpdateCharEffect(
CCmdUI* pCmdUI,
DWORD dwMask,
DWORD dwEffect);
pCmdUI
Pointer to a CCmdUI object.
dwMask
Indicates the character formatting mask.
dwEffect
Indicates the character formatting effect.
The mask dwMask specifies which character formatting attributes to check. The flags dwEffect list the character formatting attributes to set/clear.
For more information on the dwMask and dwEffect parameters and their potential values, see the corresponding data members of CHARFORMAT in the Windows SDK.
[!code-cppNVC_MFCDocView#158]
The framework calls this function to update the command UI for paragraph effect commands.
void OnUpdateParaAlign(
CCmdUI* pCmdUI,
WORD wAlign);
pCmdUI
Pointer to a CCmdUI object.
wAlign
The paragraph alignment to check. One of the following values:
-
PFA_LEFT Align the paragraphs with the left margin.
-
PFA_RIGHT Align the paragraphs with the right margin.
-
PFA_CENTER Center the paragraphs between the margins.
[!code-cppNVC_MFCDocView#159]
Call this function to format a range of text in a rich edit control to fit within rectLayout for the device specified by pDC.
long PrintInsideRect(
CDC* pDC,
RECT& rectLayout,
long nIndexStart,
long nIndexStop,
BOOL bOutput);
pDC
Pointer to a device context for the output area.
rectLayout
RECT or CRect which defines the output area.
nIndexStart
Zero-based index of the first character to be formatted.
nIndexStop
Zero-based index of the last character to be formatted.
bOutput
Indicates if the text should be rendered. If FALSE, the text is just measured.
The index of the last character that fits in the output area plus one.
Typically, this call is followed by a call to CRichEditCtrl::DisplayBand which generates the output.
See the example for CRichEditView::GetPaperSize.
Call this function to format a range of text in a rich edit control for the output device specified by pDC.
long PrintPage(
CDC* pDC,
long nIndexStart,
long nIndexStop);
pDC
Pointer to a device context for page output.
nIndexStart
Zero-based index of the first character to be formatted.
nIndexStop
Zero-based index of the last character to be formatted.
The index of the last character that fits on the page plus one.
The layout of each page is controlled by GetPageRect and GetPrintRect. Typically, this call is followed by a call to CRichEditCtrl::DisplayBand which generates the output.
Note that margins are relative to the physical page, not the logical page. Thus, margins of zero will often clip the text since many printers have unprintable areas on the page. To avoid clipping your text, you should call SetMargins and set reasonable margins before printing.
Called by the framework to paste an object into the rich edit.
virtual HRESULT QueryAcceptData(
LPDATAOBJECT lpdataobj,
CLIPFORMAT* lpcfFormat,
DWORD dwReco,
BOOL bReally,
HGLOBAL hMetaFile);
lpdataobj
Pointer to the IDataObject to query.
lpcfFormat
Pointer to the acceptable data format.
dwReco
Not used.
bReally
Indicates if the paste operation should continue or not.
hMetaFile
A handle to the metafile used for drawing the item's icon.
An HRESULT value reporting the success of the operation.
Override this function to handle different organization of COM items in your derived document class. This is an advanced overridable.
For more information on HRESULT and IDataObject
, see Structure of COM Error Codes and IDataObject, respectively, in the Windows SDK.
[!code-cppNVC_MFCDocView#160]
Call this function to set the character formatting attributes for new text in this CRichEditView
object.
void SetCharFormat(CHARFORMAT2 cf);
cf
CHARFORMAT2 structure containing the new default character formatting attributes.
Only the attributes specified by the dwMask
member of cf are changed by this function.
For more information, see EM_SETCHARFORMAT message and CHARFORMAT2 structure in the Windows SDK.
[!code-cppNVC_MFCDocView#152]
Call this function to set the printing margins for this rich edit view.
void SetMargins(const CRect& rectMargin);
rectMargin
The new margin values for printing, measured in MM_TWIPS.
If m_nWordWrap is WrapToTargetDevice
, you should call WrapChanged after using this function to adjust printing characteristics.
Note that the margins used by PrintPage are relative to the physical page, not the logical page. Thus, margins of zero will often clip the text since many printers have unprintable areas on the page. To avoid clipping your text, you should call use SetMargins
to set reasonable printer margins before printing.
See the example for CRichEditView::GetPaperSize.
Call this function to set the paper size for printing this rich edit view.
void SetPaperSize(CSize sizePaper);
sizePaper
The new paper size values for printing, measured in MM_TWIPS.
If m_nWordWrap is WrapToTargetDevice
, you should call WrapChanged after using this function to adjust printing characteristics.
[!code-cppNVC_MFCDocView#161]
Call this function to set the paragraph formatting attributes for the current selection in this CRichEditView
object.
BOOL SetParaFormat(PARAFORMAT2& pf);
pf
PARAFORMAT2 structure containing the new default paragraph formatting attributes.
Nonzero if successful; otherwise, 0.
Only the attributes specified by the dwMask
member of pf are changed by this function.
For more information, see EM_SETPARAFORMAT message and PARAFORMAT2 structure in the Windows SDK.
[!code-cppNVC_MFCDocView#162]
Call this function to reset the internal search state of the CRichEditView control after a failed call to FindText.
void TextNotFound(LPCTSTR lpszFind);
lpszFind
Contains the text string that was not found.
It is recommended that this method be called immediately after failed calls to FindText so that the internal search state of the control is properly reset.
The lpszFind parameter should include the same content as the string provided to FindText. After resetting the internal search state, this method will call the OnTextNotFound method with the provided search string.
See the example for CRichEditView::FindText.
Call this function when the printing characteristics have changed ( SetMargins or SetPaperSize).
virtual void WrapChanged();
Override this function to modify the way the rich edit view responds to changes in m_nWordWrap or the printing characteristics ( OnPrinterChanged).
[!code-cppNVC_MFCDocView#163]
MFC Sample WORDPAD
CCtrlView Class
Hierarchy Chart
CRichEditDoc Class
CRichEditCntrItem Class