Why are some items greyed out in Spy++'s Windows view?

ε祈祈猫儿з 提交于 2019-11-30 02:52:03

问题


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

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.

The following picture is an example of grey items:

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


回答1:


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.

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.



来源:https://stackoverflow.com/questions/6936283/why-are-some-items-greyed-out-in-spys-windows-view

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!