var<br> Childhandle, MainHandle: THandle;<br>begin<br> Childhandle := FindWindowEx(Mainhandle, 0, 'TButton', nil);<br> 后面你自己看着处理就行了,发送消息等等<br><br><br>EnumChildWindows这个东西是列子窗口的,下面是例子代码,网上可以找到<br><br> function EnumChildWndProc(AhWnd:HWnd;<br> AlParam:lParam):boolean;stdcall;<br><br>implementation<br><br>{$R *.dfm}<br>function EnumChildWndProc(AhWnd:HWnd;<br> AlParam:lParam):boolean;stdcall;<br>var<br> WndClassName: array[0..254] of Char;<br>begin<br> GetClassName(AhWnd,wndClassName,254);<br> with form1.memo1 do<br> lines.add( string(wndClassName)); result:=true;<br>end;<br><br>procedure GetChild(AHandle : Thandle);<br>begin<br> memo1.Lines.Clear;<br> if hWnd<>0 then EnumChildWindows(hWnd,@EnumChildWndProc,0);<br>end;<br>end.