Is there a common dialog box for Find/Find Next/Replace?
If so, how do I open it up from a program?
Printable View
Is there a common dialog box for Find/Find Next/Replace?
If so, how do I open it up from a program?
This is the function and struct you'll need to do that.
I could swear there was an example of it somewhere here, since I've seen it before, but until someone decides to fix the search thing, if ever, I can't find out if it was here or not :rolleyes:. I'd give an example if I had one, but I've never used this myself.VB Code:
'this is the find dialog Public Declare Function FindText Lib "comdlg32.dll" Alias "FindTextA" (pFindreplace As FINDREPLACE) As Long 'this is the find/replace dialog Public Declare Function ReplaceText Lib "comdlg32.dll" Alias "FindTextA" (pFindreplace As FINDREPLACE) As Long Public Type FINDREPLACE lStructSize As Long ' size of this struct 0x20 hwndOwner As Long ' handle to owner's window hInstance As Long ' stance handle of.EXE that contains cust. dlg. template flags As Long ' one or more of the FR_?? lpstrFindWhat As String ' ptr. to search string lpstrReplaceWith As String ' ptr. to replace string wFindWhatLen As Integer ' size of find buffer wReplaceWithLen As Integer ' size of replace buffer lCustData As Long ' data passed to hook fn. lpfnHook As Long ' ptr. to hook fn. or NULL lpTemplateName As String ' custom template name End Type
Thanks Kaverin,
I'll give it a try.