CEditView calls OnReplaceAll when the user selects the Replace All button in the standard Replace dialog box.
virtual void OnReplaceAll( LPCTSTR lpszFind, LPCTSTR lpszReplace, BOOL bCase );
- The text to be found.
- The text to replace the search text.
- Specifies whether search is case sensitive. If TRUE, the search is case sensitive. If FALSE, the search is not case sensitive.
OnReplaceAll searches the text in the buffer for the text specified by lpszFind, with case sensitivity specified by bCase. The search starts at the beginning of the current selection. Each time the search text is found, this function replaces that occurrence of the text with the text specified by lpszReplace. The search is accomplished through a call to FindText. In the default implementation, OnTextNotFound is called if the text is not found.
If the current selection does not match lpszFind, the selection is updated to the first occurrence of the text specified by lpszFind and a replace is not performed. This allows the user to confirm that this is what they want to do when the selection does not match the text to be replaced.
Override OnReplaceAll to change the way a CEditView-derived object replaces text.