Board index » delphi » Getting TEXT from an Edit Control in a Window of another application
Alister
![]() Delphi Developer |
Getting TEXT from an Edit Control in a Window of another application2005-02-25 10:22:01 AM delphi149 I am trying to use (in DELPHI 2005) the GetWindowText(Handle, @Buffer, SizeOf(Buffer) - 1) function to get the text info from an Edit Control of a window in ANOTHER application. (I used the GetClassName(), function to help identify the Windiow(s) I need to work with in a call with the EnumChildWindows() function). However, I read in the C++ Builder Help and at the MERS search database that you can't use GetWindowText() to retrieve the text data of an Edit Control of a window in ANOTHER application. And others suggest using other approach (in DELPHI) like - SendMessage(Handle, WM_GETTEXT, SizeOf(Buffer) - 1, Integer(@Buffer)), BUT that ALSO return a BLANK value in the "Buffer" at ALL times. I also tried using the DefWindowProc(Handle, WM_GETTEXT, SizeOf(Buffer) - 1, Integer(@Buffer)) directly in a CALLBACK function I designed for used in the EnumChildWindows() function, and that seems to FAIL as well. Can anyone demonstrate (with some code samples) EXACTLY what must be done in DELPHI (preferably) and/or in C++ Builder to retrieve the TEXT DATA of any Edit Control of a Window in ANOTHER application? Looking forward to your reply. ________________________ Alister (Francisco) John XXXX@XXXXX.COM |