unit findw;<br><br>interface<br><br>uses<br> Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,<br> Dialogs, StdCtrls;<br><br>type<br> TForm1 = class(TForm)<br> Button1: TButton;<br> procedure Button1Click(Sender: TObject);<br> private<br> { Private declarations }<br> public<br> { Public declarations }<br> end;<br><br>var<br> Form1: TForm1;<br> wnd,twnd:HWND;<br> ss:array[0..255] of char;<br> i:integer;<br> dcc:HDC;<br>implementation<br><br>{$R *.dfm}<br>procedure FWindow(var WND:HWND);<br>begin<br> GetWindowText(WND,@ss,255);<br> if copy(string(ss),0,16) = '边锋网络游戏世界' then<br> begin<br> WND:=FindWindowEx(WND,0,'MDIClient',nil);<br> for i:=1 to 3 do<br> WND:=GetWindow(WND,GW_CHILD);<br> GetClassName(WND,@ss,255);<br> Showmessage(string(ss));<br> end;<br> WND:=GetNextWindow(WND,GW_HWNDNEXT);<br> if WND <> 0 then FWindow(WND);<br>end;<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>begin<br> twnd:=GetWindow(GetDesktopWindow(),GW_CHILD);<br> FWindow(twnd);<br>end;<br><br>end.