HSHELL_WINDOWCREATED A top-level, unowned window has been created. The window exists when the system calls this hook.
上面写的很清楚,这种消息只能在top-level,unowned window被创建的时候才会生成。那什么是 top-level, unowned window 。这个网站上写的比较清楚http://www.codeguru.com/forum/showthread.php?t=491610。
Code:
// create a top-level window (not owned) HWND hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPED, // WS_CHILD style is not set, so it's a top-level window. CW_USEDEFAULT, 0, CW_USEDEFAULT, 0,