如何用自己写的程序改变其它程序的窗体大小?(20分)

R

Robot5

Unregistered / Unconfirmed
GUEST, unregistred user!
不太清楚是用什么方法,还有如果要改变窗体大小的程序做了全局hook拦截怎么办?<br>能给个程序出来看看吗?谢谢了。
 
先用GetWindow查找窗口,再SetWindowPos就可以实现.
 
谢谢,但我还想问一下,做hook时是不是一定要用dll文件?<br>还有有setWindowsPos的函数说明吗?不知道怎么用呀!<br>还有就是用SetWindowsPos是不是在有些系统中会失效?<br>用说一下98/ME/2000/XP/2003中各用什么函数吗?谢谢了!
 
做hook时一般都是用dll文件,因為事件發生時的代碼要常住內存.<br>BOOL SetWindowPos(<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;);<br>具體用法查看win32.hlp
 
谢谢!收下了!
 
顶部