求调整另一程序的窗口大小和位置的API(50分)

  • 主题发起人 主题发起人 歪就歪
  • 开始时间 开始时间

歪就歪

Unregistered / Unconfirmed
GUEST, unregistred user!
如:<br><br>WinExec('notepad.exe', xxxx);<br>h := FindWindow('notepad', nil);<br><br>??? &nbsp;ReSizeWindow(h, x, y, width, height);<br><br>有这玩艺么?<br><br><br>
 
用SetWindowPos。<br><br>The SetWindowPos function changes the size, position, and Z order of a child, pop-up, or top-level window. Child, pop-up, and top-level windows are ordered according to their appearance on the screen. The topmost window receives the highest rank and is the first window in the Z order. <br><br>BOOL SetWindowPos(<br><br>&nbsp; &nbsp; HWND hWnd, // handle of window<br>&nbsp; &nbsp; HWND hWndInsertAfter, // placement-order handle<br>&nbsp; &nbsp; int X, // horizontal position<br>&nbsp; &nbsp; int Y, // vertical position<br>&nbsp; &nbsp; int cx, // width<br>&nbsp; &nbsp; int cy, // height<br>&nbsp; &nbsp; UINT uFlags // window-positioning flags<br>&nbsp; &nbsp;);
 
谢了,很快呀。
 
&nbsp;WinExec('notepad.exe',sw_normal );<br>&nbsp; h := FindWindow('notepad', nil);<br>&lt;font size=10 color=#ff0000&gt; &nbsp;movewindow(h,1,1,200,40,true); &nbsp;&lt;/a&gt;也行.<br>
 
www, 谢谢你!
 
后退
顶部