N
netbug
Unregistered / Unconfirmed
GUEST, unregistred user!
请看:<br> procedure ww(var w:TWMGettext);message wm_gettext;<br> ....<br>enumwindowsproc=function (hnd:THandle;paramointer):boolean;stdcall;<br> procedure TForm1.ww(var w:TWMGettext);<br> begin<br> form1.ListBox1.Items.Add(w.Text);<br> end;<br> function gettitle(hnd:THandle;paramointer):boolean;stdcall;<br> begin<br> sendmessage(hnd,wm_gettext,0,0);<br> result:=true;<br> end;<br>procedure TForm1.Button1Click(Sender: TObject);<br>var i:integer;ewproc:enumwindowsproc;<br>begin<br>listbox1.Items.Clear;<br>ewproc:=gettitle;<br>i:=findwindow(nil,'Form2');//注意<br>enumchildwindows(i,@ewproc,0);<br>end;<br>我用此应用程序想去获得form2中的edit1中的字符串,没有成功,<br>后来我把i:=findwindow(nil,'Form2')改成i:=findwindow(nil,'Form1')<br>想去获得本应用程序的Edit1中的字符串,仍然没有成功,我该如何做呢?<br>还望各位高手不令赐教,我在此先给给位鞠躬了,谢谢大家!<br>