Monitor creation of a window (HWND)

こ雲淡風輕ζ 提交于 2019-12-25 01:10:02

问题


I would like to Monitor the creation of windows (HWND) in C.

I'd like to know if there's some kind of event that the WINAPI provides to handle the creation of a window.


回答1:


If you are concerned only with top-level windows, you can use SetWindowHookEx to register a ShellProc and watch for HSHELL_WINDOWCREATED. If you need notification of the creation of any window, you can use a CallWndProc and watch for WM_CREATE messages.



来源:https://stackoverflow.com/questions/7019523/monitor-creation-of-a-window-hwnd

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