Hello,
I have a problem, I need to read text from a text box in another application.
Using Spy++ I found that the text box's class is Internet Explorer_Server
I tried SendMessage and a few other functions but it didn't work.
Thanks in advance.
This is a discussion on Get text from other window within the Windows Programming forums, part of the Platform Specific Boards category; Hello, I have a problem, I need to read text from a text box in another application. Using Spy++ I ...
Hello,
I have a problem, I need to read text from a text box in another application.
Using Spy++ I found that the text box's class is Internet Explorer_Server
I tried SendMessage and a few other functions but it didn't work.
Thanks in advance.
Last edited by Adrian++; 08-03-2008 at 11:36 AM.
GetWindowText API function.
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^
GetWindowText can get only the Text from the main window (if you give it a HWND from another process)
No, that's incorrect. Pass the correct HWND to GetWindowText and it will retrieve the text.
It works with edit controls, as well.
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^
I'm not sure if will can work with textboxes but anyways, you can also use pipes.
Here is a thread that discusses this issue in detail
As I seem to recall, GetWindowText just sends WM_GETTEXT, which is the method to retrieve the text from a control (indeed, I have been doing this for ages using MFC).
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^
(I think) He wants to get text from an application which is not related to his. I dont know of any basic API function for this, you'd probably need some sort of hook to intercept the text flowing to the other programs controls.
Code:Error W8057 C:\\Life.cpp: Invalid number of arguments in function run(Brain *)
So what you are implying is that you can't use GetWindowText for controls outside your own window?
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^