List windows and detect new windows

浪子不回头ぞ 提交于 2020-01-17 05:06:51

问题


I'd like to get a list of all the windows every time a new window is created. For now, I'm using a timer which gets an enumeration of all the windows.

But I'd like to avoid using a timer, and subscribe to any kind of event that is triggered when a window (or a process) is created...

How could I do this?


回答1:


You can monitor all Window creating processes using SetWindowsHookEx with a CBTProc



来源:https://stackoverflow.com/questions/40697822/list-windows-and-detect-new-windows

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