EM_FINDTEXT message

Finds text within a rich edit control.

Parameters

wParam

Specify the parameters of the search operation. This parameter can be one or more of the following values.

Value Meaning
FR_DOWN
Microsoft Rich Edit 2.0 and later: If set, the search is from the end of the current selection to the end of the document. If not set, the search is from the end of the current selection to the beginning of the document.
Microsoft Rich Edit 1.0: The FR_DOWN flag is ignored. The search is always from the end of the current selection to the end of the document.
FR_MATCHALEFHAMZA
Microsoft Rich Edit 3.0 and later: If set, the search differentiates between Arabic alefs with different accents. If not set, all alefs are matched by the alef character alone.
FR_MATCHDIAC
Microsoft Rich Edit 3.0 and later: If set, the search operation considers Arabic and Hebrew diacritical marks. If not set, diacritical marks are ignored.
FR_MATCHKASHIDA
Microsoft Rich Edit 3.0 and later: If set, the search operation considers Arabic kashidas. If not set, kashidas are ignored.
FR_MATCHWIDTH
Windows 8: If set, single-byte and double-byte versions of the same character are considered to be not equal.
FR_WHOLEWORD
If set, the operation searches only for whole words that match the search string. If not set, the operation also searches for word fragments that match the search string.

lParam

A FINDTEXT structure containing information about the find operation.

Return value

If the target string is found, the return value is the zero-based position of the first character of the match. If the target is not found, the return value is -1.

Remarks

The cpMin member of FINDTEXT.chrg always specifies the starting-point of the search, and cpMax specifies the end point. When searching backward, cpMin must be equal to or greater than cpMax. When searching forward, a value of -1 in cpMax extends the search range to the end of the text.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Richedit.h

See also

FINDTEXT