Win32应用的现场视觉树

发布于 2025-01-24 12:14:28 字数 420 浏览 2 评论 0 原文

我曾在基于XAML的UWP应用程序和实时视觉树有时证明了功能有时可以检查应用程序中UI元素的实际维度和属性。在 win32桌面应用程序中检查本机元素是否有类似的东西,我可以在该应用程序中查询本机视图的尺寸?

I have worked on XAML-based UWP apps and the Live Visual Tree feature proved handy sometimes to inspect the actual dimensions and properties of UI elements within the app. Is there something similar to inspect native elements within a Win32 desktop app where I can query the dimensions of native views within the app?

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

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

发布评论

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

评论(1

南风几经秋 2025-01-31 12:14:28

由于您是专门要求使用本机窗口,因此递归致电 enumchildWindows 是适当的解决方案。拥有 hwnd 后,您可以调用 getWindowRect 检索窗口尺寸。

Since you're specifically asking for native windows, recursively calling EnumChildWindows is the appropriate solution. Once you have an HWND you can call GetWindowRect to retrieve the window dimensions.

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