unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
ID2:Array [0..255] OF Char;
implementation
{$R *.dfm}
Procedure Get2(QHwnd:Hwnd);
Var
TempH:Hwnd;
Begin
try
TempH:=FindWindowEx(QHwnd,0,'Static',nil);
SendMessage(TempH,WM_GETTEXT,255,integer(@ID2));
except end;
End;
procedure TForm1.Button1Click(Sender: TObject);
begin
if findwindow('#32770',nil)>0 then
begin
get2(findwindow('#32770',nil));
memo1.Text:=strpas(@ID2);
end;
end;
end.