L
lingguang8888
Unregistered / Unconfirmed
GUEST, unregistred user!
hWnd = GetForegroundWindow();<br> GetWindowThreadProcessId(Form1->Handle,&selfProcess);<br> GetWindowThreadProcessId(hWnd,&activeProcess);<br><br> if( hWnd > 0 <br> {<br> AttachThreadInput(activeProcess, selfProcess , True);<br> hWndEdit = GetFocus();<br> SetWindowText(hWndEdit,"ok"<br> SendMessage(hWnd, WM_NEXTDLGCTL, 0, 0);<br> AttachThreadInput(activeProcess, selfProcess , False);<br> }<br>当前窗口是自身时可用,付值正常,<br>在当前窗口是其它进程窗口时,不付值,我想是获得当前edit句柄错误<br>没分了,请帮忙,谢谢