如何在Mozilla Firefox中获取窗口句柄 [英] How To Get Window handles In Mozilla Firefox

查看:221
本文介绍了如何在Mozilla Firefox中获取窗口句柄的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Mozilla firefox中获取所有子窗口的句柄. Spy ++仅显示所有窗口的一个类和窗口标题.我尝试使用GetWindow和FindWindowEx,但一无所获.我想从mozilla firefox中读取URL.

解决方案

Spy ++使用标准Windows API调用来检查窗口层次结构( EnumChildWindows 等).如果Spy ++不显示任何本机窗口,则没有任何本机窗口.因此,您也找不到任何本机窗口. Firefox使用的是无窗口控件.

如果您需要自动化GUI(这可能是您希望查找本机窗口的原因),请使用可用的标准基础结构: 解决方案

Spy++ uses standard Windows API calls to inspect window hierarchies (EnumWindows, EnumChildWindows, etc.). If Spy++ doesn't show any native windows, then there aren't any native windows. Consequently, you cannot find any native windows either. Firefox uses what's called Windowless Controls.

If you need to automate a GUI (which is likely the reason why you wish to find native windows), use the standard infrastructure available: UI Automation.

这篇关于如何在Mozilla Firefox中获取窗口句柄的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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