GetWindowText Win32 API call

  • Thread starter Thread starter R Huff
  • Start date Start date
R

R Huff

I am trying to capture some text of an external application by using
the GetWindowText Win32 function. I am able to successfully retrieve
the text of some windows in the application (text boxes, some lables,
etc), but one window which is of the class APXWND70 is not exposing
the text or any sub windows that may contain the text. It appears
that this window is some sort of panel with a textbox on it, although
the textbox does not show as a seperate window when using the Spy++
program to capture the window handles.

Any ideas?
 
If the window does not expose the text, then its impossible to capture it.
So are you trying to capture the text of the textbox in the APXWND70?
 
R. Huff

read the docs for the GetWindowText API call -- it works as expected for
windows in the current process, but across process boundaries it has
peculiar behavior. fow hwnd in a different process, then you must
explicitly send the WM_GETTEXT message.

here is the interesting part from the documentation:

<If the target window is owned by the current process, GetWindowText
causes a WM_GETTEXT message to be sent to the specified window or
control. If the target window is owned by another process and has a
caption, GetWindowText retrieves the window caption text. If the
window does not have a caption, the return value is a null string. >

roy fine
 
Back
Top