FindTextW Function #
The FindTextW function displays the system-defined Find common dialog box to allow the user to select search criteria.
Syntax
BOOL FindTextW(
_In_ LPFINDTEXTEXW lpFindText
);
Parameters
Parameter | Description |
---|---|
lpFindText |
A pointer to a FINDTEXTEXW structure that contains information about the search criteria to be initialized. This structure can be modified by the user when the dialog box is displayed. |
Return Value
If the function succeeds, the return value is TRUE. The user has clicked the Find Next button, and the structure pointed to by lpFindText
contains information about the search criteria.
If the function fails or the user cancels the dialog box, the return value is FALSE. To get extended error information, call CommDlgExtendedError.
Remarks
The FindTextW function is the wide-character (Unicode) version of the FindText function.
The dialog box displayed by FindTextW supports the following standard controls:
- Find What: Edit control for entering text to search for.
- Match whole word only: Checkbox to enable whole word matching.
- Match case: Checkbox to enable case-sensitive matching.
- Find Next: Button to perform the search.
- Cancel: Button to close the dialog box.
- Help: Button to display help.
The application must provide a window procedure for the Find dialog template. This procedure must handle the WM_NOTIFY
message. The lParam parameter of WM_NOTIFY
points to a NMHDR structure, followed by a FINDTEXT structure. The idFrom
member of the NMHDR
structure is the identifier of the control that generated the notification. The code
member is the notification code.
The Find dialog box sends the CDN_INITDONE notification code when it has finished initializing, and the CDN_SELCHANGE notification code when the selection in the Find What edit control changes.