Compartilhar via


CEditView::FindText

Call the FindText function to search the CEditView object's text buffer.

BOOL FindText(
   LPCTSTR lpszFind,
   BOOL bNext = TRUE,
   BOOL bCase = TRUE 
);

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.

Return Value

Nonzero if the search text is found; otherwise 0.

Remarks

This function searches the text in the buffer for the text specified by lpszFind, starting at the current selection, in the direction specified by bNext, and with case sensitivity specified by bCase. If the text is found, it sets the selection to the found text and returns a nonzero value. If the text is not found, the function returns 0.

You normally do not need to call the FindText function unless you override OnFindNext, which calls FindText.

Requirements

Header: afxext.h

See Also

Reference

CEditView Class

Hierarchy Chart

CEditView::OnFindNext

CEditView::OnReplaceAll

CEditView::OnReplaceSel

CEditView::OnTextNotFound

Other Resources

CEditView Members