|
-
Dec 27th, 2001, 10:35 AM
#1
Thread Starter
Member
Get other application's content/text...
I am doing a program that needs to know the content of other window application. For example, if use ShellExecute to call Norton to scan a file, I want to know the result of the scanning. This can only be done if I can get the content of the Norton window. What can I do to 'retrieves' the content?
Or can I know the text/string on any button on Norton's window?
Please guide...
Thanks a lot on any help offers....
-
Dec 27th, 2001, 02:49 PM
#2
This is the outline:
1. run Norton (or whatever)
2. invoke Spy++ to find out what type of window or control it is you want to access
3. Use SendMessage() api to request information from the control.
There are other api's to use as well - like GetWindowText.
It depends on what type of window it is, and what data you want.
IF you go to www.allapi.net and look in the article section, you will find several articles on using SendMessage to request data from various boxes , controls, & windows.
This isn't very specific, but your description is likewise vague.
-
Dec 27th, 2001, 03:56 PM
#3
Hyperactive Member
Jim is right...
The only thing I will add to it is that in order to use sendmessage, you must first know the handle to the window. This can be obtained through the use of FindWindow(classname, caption). You can use the classname and vbnullstring for the caption, vbnullstring for the classname and the text of the caption, or the proper values for both classname and caption. This will return a value to a parent window. Then you need to use FindWindowEx to get the handles to the child windows(or controls). Once you have the handle to the proper child, you can use sendmessage with the 2nd parameter being wm_gettext. If you need me to elaborate further, just ask.
Joe
-
Dec 28th, 2001, 03:33 AM
#4
Thread Starter
Member
I've tried the spy stuff (downloaded) but it can't works... it works well with other windows but not with this Norton windows..
i am thinking of using sendmessage but how do i send "alt + e" by sendmessage?
please guide... thanks..
-
Dec 30th, 2001, 11:42 AM
#5
Hyperactive Member
I don't quite get it...
Are you using the right click simulation of scanning a file(i.e. right click: scan this file with Norton AntiVirus)? If you are, a dialog box pops up that you can easily get the text of. Actually, I just looked now, everything you need to get to is easily accessible. Do you need more help with how to use spy++? If so I would be glad to help.
Joe
-
Dec 31st, 2001, 03:49 AM
#6
Thread Starter
Member
Yes, it is the simulation of scan this file with Norton (right click). I need to know the result of the scanning.. if it contains virus or no. So, I need to know the text/content of it. I've never use Spy++ before. Do I need to include it in my program for distribution or anything.. Thanks so much for ur help. I really appreciate it.
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
|