#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Posts
    15
    Rep Power
    0

    Question Find text in an edit control window


    How do I use the Find dialog box to find text in an edit control window? I've got it to show the Find box (using FindText() ), and when I press Find Next I can make it do something. How do I actually make it find the text though? I've tried SendMessage(hEdit,EM_FINDTEXT,0,&ft) but that doesnt seem to do anything. Thanks for the help.

    Shane Blazek
  2. #2
  3. No Profile Picture
    Offensive Member
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2002
    Location
    in the perfect world
    Posts
    622
    Rep Power
    27
    Do you want to find and replace text (ie text editor) or just get what the user has typed into an edit control?


    The find common dialog just gets what the user wants you to find (and replace).
    You must then do the work.

    Display the dlg.
    Get the search strings from the structure returned.
    Get the edit text with GetDlgItemText() (or similar)

    Now do the required operations (find and replace ect) with the string functions.
    The essence of Christianity is told us in the Garden of Eden history. The fruit that was forbidden was on the Tree of Knowledge. The subtext is, All the suffering you have is because you wanted to find out what was going on. You could be in the Garden of Eden if you had just kept your f***ing mouth shut and hadn't asked any questions.

    Frank Zappa

IMN logo majestic logo threadwatch logo seochat tools logo