A abcxca Unregistered / Unconfirmed GUEST, unregistred user! 2003-03-28 #1 如何用mouse点一点我的程序中的一个按钮,就让另一个窗口(拥有该窗口的句柄),<br>获得焦点并能接收键盘输入.<br>
任 任豆豆 Unregistered / Unconfirmed GUEST, unregistred user! 2003-03-28 #2 postmessage(窗口句柄,WM_SETFOCUS,0,0)
J jiajiajia888 Unregistered / Unconfirmed GUEST, unregistred user! 2003-03-28 #3 if wnd<>0 then<br>begin<br> if isiconic(wnd) then<br> ShowWindow(wnd,sw_restore)<br> else<br> SetForegroundWindow(wnd);<br>end;
if wnd<>0 then<br>begin<br> if isiconic(wnd) then<br> ShowWindow(wnd,sw_restore)<br> else<br> SetForegroundWindow(wnd);<br>end;
A abcxca Unregistered / Unconfirmed GUEST, unregistred user! 2003-03-28 #5 更正: jiajiajia888的方法可行.<br> 但如果窗口被最小化了呢?
S seeyouknowme Unregistered / Unconfirmed GUEST, unregistred user! 2003-03-28 #6 if wnd<>0 then<br>begin<br> if isiconic(wnd) then<br> begin<br> ShowWindow(wnd,sw_restore)<br> SetForegroundWindow(wnd);<br> end;<br>end;<br>这样,最小化问题就解决了
if wnd<>0 then<br>begin<br> if isiconic(wnd) then<br> begin<br> ShowWindow(wnd,sw_restore)<br> SetForegroundWindow(wnd);<br> end;<br>end;<br>这样,最小化问题就解决了
S seeyouknowme Unregistered / Unconfirmed GUEST, unregistred user! 2003-03-28 #7 其实,完全没必要加isiconic() <br>就它即可:<br>if wnd<>0 then<br>begin<br><br> ShowWindow(wnd,sw_restore)<br> SetForegroundWindow(wnd);<br>end;<br><br>
其实,完全没必要加isiconic() <br>就它即可:<br>if wnd<>0 then<br>begin<br><br> ShowWindow(wnd,sw_restore)<br> SetForegroundWindow(wnd);<br>end;<br><br>