FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Contents of the input field
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Contents of the input field
Posted: Tue Nov 12, 2019 06:16 AM

Hi,

On the window of someone else's application there is an input field (class Edit).
There is text in this field. I know the pointer of this field and want to get its contents

DEFINE WM_GETTEXT 13

buf:=space(200)
SendMessage(hWn, WM_GETTEXT, 200, @buf)

As a result, I get an empty value. What am I wrong about ?

Windows 10, FWH 18.06

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Contents of the input field
Posted: Wed Nov 13, 2019 05:47 AM

Natter,

Do it this way:

MsgInfo( GetWindowText( hWnd ) )

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Contents of the input field
Posted: Wed Nov 13, 2019 06:57 AM

Since I need to get the text from someone else's application, the Getwindowtext(hWn) function will return an empty value.
I solved this problem using clipboard

SendMessage(hWn, EM_SETSEL, 0, -1)
SendMessage(hWn, WM_COPY, 0, 0)
buf:=oClp:GetText()

Continue the discussion