|
-
Mar 30th, 2003, 11:29 PM
#1
Thread Starter
Addicted Member
Getting text from active window
Hi,
This question can be easily understood by PGP/GnuPG users.
My VB application starts in the system tray. I want that as the user selects an option to encrypt or decrypt text, the text in any window opened on the desktop (e.g., Notepad) should automatically get selected and transferred to my program.
I thing some API function like "GetWindowText" is there for doing this.
Any Idea?
.............
Rohit.
-
Mar 31st, 2003, 01:38 AM
#2
Check out this API website.
This function cannot retrieve the text of an 'EDIT' control in another application.
This function is for reading or setting the title bar caption of a window.
Try looking at GetActiveWindow function.
It will return the handle of the Active window.
Then you just need to find the "EDIT" type of child window.
For that try using FindWindowEx.
Then Enumerate the child windows until you find the 'EDIT' type.
I don't know how you are going to determine which EDIT window
is the right one since different apps are going to have a different window structures.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|