Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get text from CEdit in another application

Status
Not open for further replies.

longdv

Programmer
Nov 6, 2000
5
VN
How can I get text from a control in other application? (it's prevented from copying and cutting).
 
I don't know if this is the best solution, but you could tie the edit box to a variable and write the variable somewhere in the registry and have the other application pull it out from there. If you're interested in some good registry wrapper classes, check out Let me know if you'd like more detail...

Greg
 
You could also look into It offers good solutions too.
One other technique would be to write into a temprovary file which can be used by another application, but ofcourse there are constraints.
 
Thank you for your reply, but both of you misunderstand me. I have received an EXE file, it's used to open my files and display contents of the files but I cannot GET THE TEXT OF CONTENTS. I'v tried to use Spy++ to get the "window handle" and create a new CEdit from this handle but it doesn't work. Please tell me how to solve this problem.
 

You mean the view will not allow you to cut or copy the data you see? Nothing you can do unless you have the source code.

Can you open the file in some other app?

Brother C
 
> and create a new CEdit from this handle

Well that certainly is not going to work.

Perhaps once you get the handle using spy you can post a WM_GETTEXTLENGTH and WM_GETTEXT messages directly to the edit control. But I've never tried it.

Good luck
-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top