Skip to content

Latest commit

 

History

History
366 lines (280 loc) · 15.5 KB

ns-commdlg-findreplacea.md

File metadata and controls

366 lines (280 loc) · 15.5 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NS:commdlg.tagFINDREPLACEA
FINDREPLACEA (commdlg.h)
Contains information that the FindText and ReplaceText functions use to initialize the Find and Replace dialog boxes. (ANSI)
*LPFINDREPLACEA
FINDREPLACE
FINDREPLACE structure [Dialog Boxes]
FINDREPLACEA
FINDREPLACEW
FR_DIALOGTERM
FR_DOWN
FR_ENABLEHOOK
FR_ENABLETEMPLATE
FR_ENABLETEMPLATEHANDLE
FR_FINDNEXT
FR_HIDEMATCHCASE
FR_HIDEUPDOWN
FR_HIDEWHOLEWORD
FR_MATCHCASE
FR_NOMATCHCASE
FR_NOUPDOWN
FR_NOWHOLEWORD
FR_REPLACE
FR_REPLACEALL
FR_SHOWHELP
FR_WHOLEWORD
LPFINDREPLACE
LPFINDREPLACE structure pointer [Dialog Boxes]
_win32_FINDREPLACE_str
_win32_findreplace_str_cpp
commdlg/FINDREPLACE
commdlg/FINDREPLACEA
commdlg/FINDREPLACEW
commdlg/LPFINDREPLACE
dlgbox.findreplace_str
winui._win32_findreplace_str
dlgbox\findreplace_str.htm
dlgbox
VS|winui|~\winui\windowsuserinterface\userinput\commondialogboxlibrary\commondialogboxreference\commondialogboxstructures\findreplace.htm
12/05/2018
*LPFINDREPLACEA, FINDREPLACE, FINDREPLACE structure [Dialog Boxes], FINDREPLACEA, FINDREPLACEW, FR_DIALOGTERM, FR_DOWN, FR_ENABLEHOOK, FR_ENABLETEMPLATE, FR_ENABLETEMPLATEHANDLE, FR_FINDNEXT, FR_HIDEMATCHCASE, FR_HIDEUPDOWN, FR_HIDEWHOLEWORD, FR_MATCHCASE, FR_NOMATCHCASE, FR_NOUPDOWN, FR_NOWHOLEWORD, FR_REPLACE, FR_REPLACEALL, FR_SHOWHELP, FR_WHOLEWORD, LPFINDREPLACE, LPFINDREPLACE structure pointer [Dialog Boxes], _win32_FINDREPLACE_str, _win32_findreplace_str_cpp, commdlg/FINDREPLACE, commdlg/FINDREPLACEA, commdlg/FINDREPLACEW, commdlg/LPFINDREPLACE, dlgbox.findreplace_str, winui._win32_findreplace_str
commdlg.h
Windows.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
FINDREPLACEW (Unicode) and FINDREPLACEA (ANSI)
Windows
FINDREPLACEA, *LPFINDREPLACEA
19H1
tagFINDREPLACEA
commdlg/tagFINDREPLACEA
LPFINDREPLACEA
commdlg/LPFINDREPLACEA
FINDREPLACEA
commdlg/FINDREPLACEA
c++
APIRef
kbSyntax
HeaderDef
Commdlg.h
FINDREPLACE
FINDREPLACEA
FINDREPLACEW

FINDREPLACEA structure

-description

Contains information that the FindText and ReplaceText functions use to initialize the Find and Replace dialog boxes. The FINDMSGSTRING registered message uses this structure to pass the user's search or replacement input to the owner window of a Find or Replace dialog box.

-struct-fields

-field lStructSize

Type: DWORD

The length, in bytes, of the structure.

-field hwndOwner

Type: HWND

A handle to the window that owns the dialog box. The window procedure of the specified window receives FINDMSGSTRING messages from the dialog box. This member can be any valid window handle, but it must not be NULL.

-field hInstance

Type: HINSTANCE

If the FR_ENABLETEMPLATEHANDLE flag is set in the Flags, hInstance is a handle to a memory object containing a dialog box template. If the FR_ENABLETEMPLATE flag is set, hInstance is a handle to a module that contains a dialog box template named by the lpTemplateName member. If neither flag is set, this member is ignored.

-field Flags

Type: DWORD

A set of bit flags that you can use to initialize the dialog box. The dialog box sets these flags when it sends the FINDMSGSTRING registered message to indicate the user's input. This member can be one or more of the following values.

Value Meaning
FR_DIALOGTERM
0x00000040
If set in a FINDMSGSTRING message, indicates that the dialog box is closing. When you receive a message with this flag set, the dialog box handle returned by the FindText or ReplaceText function is no longer valid.
FR_DOWN
0x00000001
If set, the Down button of the direction radio buttons in a Find dialog box is selected indicating that you should search from the current location to the end of the document. If not set, the Up button is selected so you should search to the beginning of the document. You can set this flag to initialize the dialog box. If set in a FINDMSGSTRING message, indicates the user's selection.
FR_ENABLEHOOK
0x00000100
Enables the hook function specified in the lpfnHook member. This flag is used only to initialize the dialog box.
FR_ENABLETEMPLATE
0x00000200
Indicates that the hInstance and lpTemplateName members specify a dialog box template to use in place of the default template. This flag is used only to initialize the dialog box.
FR_ENABLETEMPLATEHANDLE
0x00002000
Indicates that the hInstance member identifies a data block that contains a preloaded dialog box template. The system ignores the lpTemplateName member if this flag is specified.
FR_FINDNEXT
0x00000008
If set in a FINDMSGSTRING message, indicates that the user clicked the Find Next button in a Find or Replace dialog box. The lpstrFindWhat member specifies the string to search for.
FR_HIDEUPDOWN
0x00004000
If set when initializing a Find dialog box, hides the search direction radio buttons.
FR_HIDEMATCHCASE
0x00008000
If set when initializing a Find or Replace dialog box, hides the Match Case check box.
FR_HIDEWHOLEWORD
0x00010000
If set when initializing a Find or Replace dialog box, hides the Match Whole Word Only check box.
FR_MATCHCASE
0x00000004
If set, the Match Case check box is selected indicating that the search should be case-sensitive. If not set, the check box is unselected so the search should be case-insensitive. You can set this flag to initialize the dialog box. If set in a FINDMSGSTRING message, indicates the user's selection.
FR_NOMATCHCASE
0x00000800
If set when initializing a Find or Replace dialog box, disables the Match Case check box.
FR_NOUPDOWN
0x00000400
If set when initializing a Find dialog box, disables the search direction radio buttons.
FR_NOWHOLEWORD
0x00001000
If set when initializing a Find or Replace dialog box, disables the Whole Word check box.
FR_REPLACE
0x00000010
If set in a FINDMSGSTRING message, indicates that the user clicked the Replace button in a Replace dialog box. The lpstrFindWhat member specifies the string to be replaced and the lpstrReplaceWith member specifies the replacement string.
FR_REPLACEALL
0x00000020
If set in a FINDMSGSTRING message, indicates that the user clicked the Replace All button in a Replace dialog box. The lpstrFindWhat member specifies the string to be replaced and the lpstrReplaceWith member specifies the replacement string.
FR_SHOWHELP
0x00000080
Causes the dialog box to display the Help button. The hwndOwner member must specify the window to receive the HELPMSGSTRING registered messages that the dialog box sends when the user clicks the Help button.
FR_WHOLEWORD
0x00000002
If set, the Match Whole Word Only check box is selected indicating that you should search only for whole words that match the search string. If not set, the check box is unselected so you should also search for word fragments that match the search string. You can set this flag to initialize the dialog box. If set in a FINDMSGSTRING message, indicates the user's selection.

-field lpstrFindWhat

Type: LPTSTR

The search string that the user typed in the Find What edit control. You must dynamically allocate the buffer or use a global or static array so it does not go out of scope before the dialog box closes. The buffer should be at least 80 characters long. If the buffer contains a string when you initialize the dialog box, the string is displayed in the Find What edit control. If a FINDMSGSTRING message specifies the FR_FINDNEXT flag, lpstrFindWhat contains the string to search for. The FR_DOWN, FR_WHOLEWORD, and FR_MATCHCASE flags indicate the direction and type of search. If a FINDMSGSTRING message specifies the FR_REPLACE or FR_REPLACE flags, lpstrFindWhat contains the string to be replaced.

-field lpstrReplaceWith

Type: LPTSTR

The replacement string that the user typed in the Replace With edit control. You must dynamically allocate the buffer or use a global or static array so it does not go out of scope before the dialog box closes. If the buffer contains a string when you initialize the dialog box, the string is displayed in the Replace With edit control.

If a FINDMSGSTRING message specifies the FR_REPLACE or FR_REPLACEALL flags, lpstrReplaceWith contains the replacement string .

The FindText function ignores this member.

-field wFindWhatLen

Type: WORD

The length, in bytes, of the buffer pointed to by the lpstrFindWhat member.

-field wReplaceWithLen

Type: WORD

The length, in bytes, of the buffer pointed to by the lpstrReplaceWith member.

-field lCustData

Type: LPARAM

Application-defined data that the system passes to the hook procedure identified by the lpfnHook member. When the system sends the WM_INITDIALOG message to the hook procedure, the message's lParam parameter is a pointer to the FINDREPLACE structure specified when the dialog was created. The hook procedure can use this pointer to get the lCustData value.

-field lpfnHook

Type: LPFRHOOKPROC

A pointer to an FRHookProc hook procedure that can process messages intended for the dialog box. This member is ignored unless the FR_ENABLEHOOK flag is set in the Flags member. If the hook procedure returns FALSE in response to the WM_INITDIALOG message, the hook procedure must display the dialog box or else the dialog box will not be shown. To do this, first perform any other paint operations, and then call the ShowWindow and UpdateWindow functions.

-field lpTemplateName

Type: LPCTSTR

The name of the dialog box template resource in the module identified by the hInstance member. This template is substituted for the standard dialog box template. For numbered dialog box resources, this can be a value returned by the MAKEINTRESOURCE macro. This member is ignored unless the FR_ENABLETEMPLATE flag is set in the Flags member.

-see-also

Common Dialog Box Library

Conceptual

FRHookProc

FindText

MAKEINTRESOURCE

Reference

ReplaceText

ShowWindow

WM_INITDIALOG

-remarks

Note

The commdlg.h header defines FINDREPLACE as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.