视窗清单 [英] window lists
本文介绍了视窗清单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在开发一个程序,在该程序中,我需要获取所有打开的窗口的列表,例如我的计算机,记事本或VLC.
我可以访问这些进程,但问题是,资源管理器只有一个打开的进程,如果我有两个驱动器处于打开状态,如何同时访问它们?
I am developing a program in which I need to get a list of all open windows be that my computer one or a notepad one or a VLC one.
I can access the processes but the problem is that, explorer has only one open process and if I have two drives open, how do I access them both?
推荐答案
您可以使用API枚举所有窗口
You can enumerate all the windows using the API
BOOL WINAPI EnumWindows(
__in WNDENUMPROC lpEnumFunc,
__in LPARAM lParam
);
上面的函数将回调
The above function will callback
BOOL CALLBACK EnumWindowsProc(
__in HWND hwnd,
__in LPARAM lParam
);
每个窗口的功能,以及可以使用的所有必要信息.
您还可以使用EnumDesktopWindows
API
function for each Window with all the necessary information that you can use.
You can also use EnumDesktopWindows
API
这篇关于视窗清单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文