다음을 통해 공유


CEditView::OnReplaceSel

CEditView calls OnReplaceSel when the user selects the Replace button in the standard Replace dialog box.

virtual void OnReplaceSel( 
   LPCTSTR lpszFind, 
   BOOL bNext, 
   BOOL bCase, 
   LPCTSTR lpszReplace  
);

Parameters

  • lpszFind
    The text to be found.

  • bNext
    Specifies 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.

  • bCase
    Specifies whether the search is case sensitive. If TRUE, the search is case sensitive. If FALSE, the search is not case sensitive.

  • lpszReplace
    The text to replace the found text.

Remarks

After replacing the selection, this function searches the text in the buffer for the next occurrence of the text specified by lpszFind, in the direction specified by bNext, with case sensitivity specified by bCase. The search is accomplished through a call to FindText. If the text is not found, OnTextNotFound is called.

Override OnReplaceSel to change the way a CEditView-derived object replaces the selected text.

Requirements

Header: afxext.h

See Also

Reference

CEditView Class

Hierarchy Chart

CEditView::OnFindNext

CEditView::OnTextNotFound

CEditView::FindText

CEditView::OnReplaceAll