获取窗口的坐标,宽度,高度 [英] Get a window's coordinate,width,height

查看:90
本文介绍了获取窗口的坐标,宽度,高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何钩子窗口,当目标窗口移动或调整大小时,我可以获得新的pos和大小?

Is there any to hook a window,when the target window moved or resized,I can get the new pos and size?

推荐答案

你可以使用< a href =http://msdn.microsoft.com/en-us/library/windows/desktop/ms644990(v=vs.85).aspx> SetWindowsHookEx [ ^ ]安装API的API WH_CALLWNDPROCRET [ ^ ]挂钩。

这将在移动或调整任何窗口后调用指定的回调函数。
You can use the SetWindowsHookEx[^] API to install a WH_CALLWNDPROCRET[^] hook.
This will call the specified callback function after any window has been moved or resized.


这篇关于获取窗口的坐标,宽度,高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆