How can i get text of a textbox which belongs to another application????
Printable View
How can i get text of a textbox which belongs to another application????
What do you have? It means do you have name of your application the textbox belong to or do you know area on the screen where is the textbox?
Dmitriy, MCSE
I would use a pre-translate message to get the HWND of the window using the WindowFromPoint function... that will get the HWND of a window you drag the mouse over.. from there, you can call PostMessage and send a WM_GETTEXT message...
ex:
::PostMessage(hWnd, WM_GETTEXT, strBuffer, NULL)
If you have any more q's feel free....
I just have HWND of the textbox
if you have the hwnd of the window try using the
GetDlgItemText();
it goes like this:
GetDlgItemText(Hwnd,IDC_TEXTBOX,szBuffer,intSizeOfBuffer2Copy);let me know if it helpd you ok?
another thing... if you dont have the resource id and i guess youdont.. try using the
GetWindowText. i never tried it on Dialog items but my guess is that when you have an hwnd of a winodow this function will do..