这个问题应该用EnumChildWindows吧,<br>你看下面这个例子。<br><br>function EnumChildWindowsProc(H: HWnd; lparam: longint): Boolean; stdcall;<br>var<br> Buffer: array[0..10] of Char;<br>begin<br> Result := True; //設定為True才會再找下一個<br> getclassname(h,buffer,10);<br> if trim(StrPas(Buffer))='Edit' then<br> begin<br> ThisUrl:= StrAlloc(250);<br> SendMessage(h,WM_GETTEXT,249,Integer(ThisUrl));<br> Result:=False;//設定為false不找下一個<br> end;<br>end;<br><br>procedure GetUrl;<br>begin<br> EnumChildWindows(ParentWindow, @EnumChildWindowsProc, 0);<br>end;