MSDN上说法: This hook is called in the context of the thread that installed it. The call is made by sending a message to the thread that installed the hook. Therefore, the thread that installed the hook must have a message loop. 所以你要在SetWindowsHookEx后,用GetMessage建立消息循环……
SetThreadDesktop?
http://www.vckbase.com/document/viewdoc/?id=283
This hook is called in the context of the thread that installed it. The call is made by sending a message to the thread that installed the hook. Therefore, the thread that installed the hook must have a message loop. 所以你要在SetWindowsHookEx后,用GetMessage建立消息循环……