CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Guest

    How I get the content of an edit control belong to anothr process?

    I have obtained the handle of an edit control from another application, and can access the properties attantched the handle,but
    I can't get the content of the edit control,with ::GetWindowText().
    why? what should I do?


  2. #2
    Join Date
    May 1999
    Location
    Atlanta, GA, USA
    Posts
    443

    Re: How I get the content of an edit control belong to anothr process?

    Hi.

    If you use SPY++ to check the content of a edit box, it is always
    "" even though edit box has some string.

    I have the same problem and use copy() and paste() of CEdit class.
    That is, after you make some edit box of your dialog, you can
    copy and paster the same string from the target edit box to your
    edit box.After this, you can use GetWidnowText() to your program.

    Hope for help.
    -Masaaki Onishi-


  3. #3
    Guest

    Re: How I get the content of an edit control belong to anothr process?

    It's useless.
    After all,when the eidt control's style is ES_PASSWORD,You can't copy them. In the other hand,GetWindowText() only get the edit content belong to the same application.
    //sigh.
    Have another good Idea?



  4. #4
    Join Date
    May 1999
    Location
    Atlanta, GA, USA
    Posts
    443

    Re: How I get the content of an edit control belong to anothr process?

    Hi.

    What means "useless"?

    I made this program to read type name and value name of html
    on the dialog of MS FrontPage. And it works fine.

    Because I didn't use to read the password like "*****". I didn't
    confirm this.

    If you want to use copy(), you need set SetSel() cover all string.
    Actully, I try to find the other approach, but in vain.

    If someone knows the other solution, please tell us.
    I have many things to do, Java RMI and so on. I'm not interested in
    this topic anymore.

    Regards.
    -Masaaki Onishi-


  5. #5
    Join Date
    Jun 2000
    Posts
    8

    Re: How I get the content of an edit control belong to anothr process?

    GetText only get's the title of the window if passed a window handle and the title of the edit control if passed a handle to an edit control

    to actually get the text contained within an edit control you need to send the WM_GETTEXT message using SendMessage()

    read up abou tthese two things in the msn help files (you really should have Visual studio if you are going to be developing windows applications, in which case all the info you need is there - do a help search for these things)

    good luck

    John.

    PS
    I probably wont be reading this thread again so if you need to speak with me further then email me:
    [email protected]


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

Featured