枚举“Alt-Tabbable”桌面窗口 [英] Enumerating "Alt-Tabbable" desktop windows

查看:75
本文介绍了枚举“Alt-Tabbable”桌面窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在尝试创建一个模拟Windows任务管理器库存并允许在窗口之间切换的程序,但我遇到了问题检测窗口。

I'm currently trying to create a program that mimics the stock Windows Task Manager and allows switching between windows, but I've run into the problem of detecting the windows.

我目前正在使用一些Win32 API调用来枚举桌面的顶级窗口,但似乎总有一些额外的窗口(不属于其他顶级窗口)。我注意到ApplicationFrameHost.exe会定期运行(
检查更新?)并且可能会打开隐藏的窗口,这些窗口具有WS_VISIBLE标志但实际上并非如此。

I'm currently using a few Win32 API calls to enumerate the top-level windows of the desktop but there always seem to be a few extra windows (not belonging to the other top-level windows). I've noticed ApplicationFrameHost.exe runs itself periodically (to check for updates?) and possibly opens up hidden windows that have the WS_VISIBLE flag but are really not.

这是任务管理器中的图片。您可以看到我的程序有其他窗口库存窗口,如照片,邮件,Groove音乐,不会出现在进程的应用程序部分,也不会出现在任务栏或alt-tab中。这些过程
打开屏幕窗口或某处无法察觉?

This is a picture of what it looks like in the task manager. You can see my program has additional windows stock windows like Photos, Mail, Groove Music that do not appear in the app section of the processes nor in the taskbar or alt-tab. Do these processes open windows off the screen or somewhere undetectable?

我读过Raymond Chan的
响应
,但这已经差不多十年了,所以我想知道.NET是否已经实现了检查应用程序窗口的新方法。我目前正在使用他的算法加上几种窗口样式的额外检查(WS_VISIBLE,WS_EX_APPWINDOW和
检查窗口句柄是否有标题),但似乎没有任何帮助过滤其他窗口。是否有更新(或旧但有效)的替代方法来检查C ++中的应用程序窗口(以alt-tab显示)或最好是C#?

I've read Raymond Chan's response on the topic but that's almost a decade old so I was wondering if .NET has implemented new ways to check for application windows. I'm currently using his algorithm plus additional checks for several windows style (WS_VISIBLE, WS_EX_APPWINDOW, and checking if the window handle has a title) but none seem to help filter the additional windows. Are there newer (or old but effective) alternatives to checking for application windows (that appear in alt-tab) in C++ or preferably C#?

推荐答案

>这是任务管理器中的图片。您可以看到我的程序有其他窗口库存窗口,如照片,邮件,Groove音乐,不会出现在进程的应用程序部分,也不会出现在任务栏或alt-tab中。这些过程
打开屏幕窗口或某处无法察觉?

看看这是否有帮助:

>This is a picture of what it looks like in the task manager. You can see my program has additional windows stock windows like Photos, Mail, Groove Music that do not appear in the app section of the processes nor in the taskbar or alt-tab. Do these processes open windows off the screen or somewhere undetectable?
See if this helps:

http://stackoverflow.com/questions/32149880/how-to-identify-windows -10-background-store-processes-that-have-non-display-wi?answertab = active#tab-top

Dave


这篇关于枚举“Alt-Tabbable”桌面窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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