背景句柄!

发布于 2024-08-12 06:06:38 字数 262 浏览 4 评论 0原文

我想制作一个类似屏幕截图的效果,但是根据我的需要进行了定制,但我被困住了。

如果可能的话,我想获取 30 alpha 表单后面打开的窗口的句柄。

句柄取自全局MouseMove上的cursor.position,因此我可以使用适当的边框窗口突出显示,并且我喜欢类似if(currentHandle==this.handle) currentHandle =“behind window handle”之类的内容。我回到家,我会用可以理解的方式表达自己的意思,并原谅我的英语。谢谢

I want to make a jing like screen capture but customized for what i need and I'm stuck.

i want to take the handle of open windows that are behind my 30 alpha form if that is possible.

the handle is taken from cursor.position on global MouseMove so i can highlight with proper border windows and i like something like if(currentHandle==this.handle) currentHandle="behind window handle". i home i make my self understandably and excuse my English. Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

花开雨落又逢春i 2024-08-19 06:06:38

您需要使用 GW_HWNDNEXT 在循环中 P/Invoke GetWindow()。继续循环,直到找到一个其 GetWindowRect() 包含光标位置的窗口或者您点击了桌面窗口。留意位于窗口矩形周围的 Aero。

You'll need to P/Invoke GetWindow() in a loop, using GW_HWNDNEXT. Keep looping until you find a window whose GetWindowRect() contains the cursor position or you hit the desktop window. Watch out for Aero lying about window rectangles.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文