监视器创建窗口(HWND) [英] Monitor creation of a window (HWND)

查看:169
本文介绍了监视器创建窗口(HWND)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在C到监视器窗口(HWND)的创建。

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

我想知道是否有某种事件的WINAPI提供处理窗口的创建。

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

推荐答案

如果你只用顶级窗口而言,你可以使用的 SetWindowHookEx 来注册的 ShellProc 并观看 HSHELL_WINDOWCREATED 。如果你需要创建的通知的任何的窗口,您可以使用的 CallWndProc 并观看 WM_CREATE 消息。

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.

这篇关于监视器创建窗口(HWND)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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