Click to See Complete Forum and Search --> : How I get the content of an edit control belong to anothr process?
April 22nd, 1999, 07:43 PM
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?
Masaaki
April 22nd, 1999, 10:26 PM
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-
April 23rd, 1999, 05:26 AM
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?
Masaaki
April 23rd, 1999, 10:22 AM
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-
John Senford
June 8th, 2000, 09:39 AM
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:
johnsenford@hotmail.com
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.