FindText Function

Retrieves information about the current search operation for a Find dialog box.

BOOL FindText(
  _In_  LPFINDTEXTEX lpFindText
);

Parameters

Parameter Description
lpFindText A pointer to a FINDTEXTEX structure that contains the information to be used to initialize the dialog box. This structure must have its cbSize member set to the size, in bytes, of the structure.

Return Value

If the function succeeds, the return value is nonzero. The hwndOwner member of the FINDTEXTEX structure will contain the handle to the Find dialog box. If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

The FindText function displays a Find dialog box. The dialog box allows the user to specify text to search for and to control various search options, such as direction and case sensitivity.

To use this function, you first create or initialize a FINDTEXTEX structure. You then pass a pointer to this structure to the FindText function.

The system displays the dialog box and waits for the user to interact with it. When the user clicks the Find Next button, the FindText function returns, and the FINDTEXTEX structure is updated with the user's selections.

Note

The FindText function is part of the Rich Edit control's functionality and is typically used in conjunction with the Rich Edit API. For more advanced text searching and editing capabilities, consider using the Rich Edit controls directly.

Requirements

Value
Minimum supported client Windows 2000 Professional
Minimum supported server Windows 2000 Server
Header comdlg32.h (include windows.h)
Library comdlg32.lib
DLL comdlg32.dll

See Also