Results 1 to 3 of 3

Thread: find/replace/find next

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Feb 2001
    Location
    Crossroads
    Posts
    3,046

    find/replace/find next

    Is there a common dialog box for Find/Find Next/Replace?

    If so, how do I open it up from a program?

  2. #2
    Fanatic Member Kaverin's Avatar
    Join Date
    Oct 2000
    Posts
    930
    This is the function and struct you'll need to do that.
    VB Code:
    1. 'this is the find dialog
    2. Public Declare Function FindText Lib "comdlg32.dll" Alias "FindTextA" (pFindreplace As FINDREPLACE) As Long
    3. 'this is the find/replace dialog
    4. Public Declare Function ReplaceText Lib "comdlg32.dll" Alias "FindTextA" (pFindreplace As FINDREPLACE) As Long
    5. Public Type FINDREPLACE
    6.    lStructSize As Long ' size of this struct 0x20
    7.    hwndOwner As Long ' handle to owner's window
    8.    hInstance As Long ' stance handle of.EXE that contains cust. dlg. template
    9.    flags As Long ' one or more of the FR_??
    10.    lpstrFindWhat As String ' ptr. to search string
    11.    lpstrReplaceWith As String ' ptr. to replace string
    12.    wFindWhatLen As Integer ' size of find buffer
    13.    wReplaceWithLen As Integer ' size of replace buffer
    14.    lCustData As Long ' data passed to hook fn.
    15.    lpfnHook As Long ' ptr. to hook fn. or NULL
    16.    lpTemplateName As String ' custom template name
    17. End Type
    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 . I'd give an example if I had one, but I've never used this myself.
    Last edited by Kaverin; Jul 21st, 2001 at 04:09 PM.
    I'm baaaack...
    VB5 Professional Edition, VC++ 6
    Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se

    I feel special because I finally figured out how to loop midis: Post link
    I'm a fanatic too

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Feb 2001
    Location
    Crossroads
    Posts
    3,046
    Thanks Kaverin,

    I'll give it a try.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width