为什么有些项目在 Spy++ 的 Windows 视图中显示为灰色? [英] Why are some items greyed out in Spy++'s Windows view?

查看:29
本文介绍了为什么有些项目在 Spy++ 的 Windows 视图中显示为灰色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要修改另一个程序的窗口,我需要使用 EnumChildWindows API 调用在其中找到特定的 SysTreeView32.

To modify a window of another program, I need to find a specific SysTreeView32 in it using EnumChildWindows API call.

当我使用 Spy++ 检查窗口时,其中有许多 SysTreeView32,但除了我正在寻找的一个外,所有的都显示为灰色.

When I inspect the window using Spy++, there are a number of SysTreeView32's in it but all are greyed out except one, which is the one I'm looking for.

下图为灰色项目示例:

为什么显示的项目是灰色的,Spy++ 使用什么 API 调用来知道它是否应该使项目变灰?

Why are the shown items gray and what API call does Spy++ use to know whether it should grey out an item or not?

推荐答案

那些只是不可见的窗口 - 即没有设置 WS_VISIBLE 样式位的 HWND.它们通常是工作窗口 - 只是为了在后台处理各种消息而存在的窗口 - 或者在某些情况下是尚未可见的 UI.例如,一个允许您隐藏或显示工具栏的窗口可能只是通过使其不可见来隐藏它,而不是销毁它并在以后重新创建它.

Those are just non-visible windows - ie HWNDs that don't have the WS_VISIBLE style bit set. They are often worker windows - windows that just exist to process various messages in the background - or in some cases are UI that's yet to become visible. For example, a window that lets you hide or show a toolbar may just hide it by making it invisible rather than destroying it and recreating it later.

在您的特定情况下,WorkerW 可能是其他一些现在不需要的 UI 部分的占位符,而 msctl_statusbar32 看起来像是一个隐藏的状态栏.

In your specific case, the WorkerW could be a placeholder for some other piece of UI that's not needed right now, while the msctl_statusbar32 looks like it's a hidden status bar.

这篇关于为什么有些项目在 Spy++ 的 Windows 视图中显示为灰色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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