I am trying to access a third-party Text Fields application using delphi programming, so I need to find the handle of each "text field" using the FindWindowEx (...) function.
The problem is that all text fields have the same class name with "NO window name", this function can just give me the first TextBOx descriptor!
How can I process the rest of the text fields until they have names?
Thanks in advance.
EnumChildWindows , , " ". :
EnumChildWindows
function EnumChildren(hwnd: HWND; lParam: LPARAM): BOOL; stdcall; const TextBoxClass = 'EDIT'; (?) var ClassName: array[0..259] of Char; begin Result := True; GetClassName(hwnd, ClassName, Length(ClassName)); if ClassName = TextBoxClass then TStrings(lParam).Add(IntToHex(hwnd, 8)); end; procedure TForm1.Button1Click(Sender: TObject); begin Memo1.Clear; EnumChildWindows(OtherAppWnd, @EnumChildren, UINT_PTR(Memo1.Lines)); end;
FindWindowEx(), , , Spy ++, Winspector . , , , .., FindWindowEx(). , Dialog ( VCL , Microsoft), GetDlgItem() , , (, Spy ++ , , ).
FindWindowEx()
GetDlgItem()