在你贴出的链接的中间部分,“Types of Hooks”下面:
WH_CALLWNDPROC
Windows calls this hook whenever the Windows SendMessage function is called. The filter functions receive a hook code from Windows indicating whether the message was sent from the current thread and receive a pointer to a structure containing the actual message.
The CWPSTRUCT structure has the following form:
Copytypedef struct tagCWPSTRUCT {
LPARAM lParam;
WPARAM wParam;
DWORD message;
HWND hwnd;
} CWPSTRUCT, *PCWPSTRUCT, NEAR *NPCWPSTRUCT, FAR *LPCWPSTRUCT;
Filters can process the message, but cannot modify the message (this was possible in 16-bit Windows). The message is sent to the Windows function for which it was intended. This hook is a significant drain on system performance, especially when it is installed as a systemwide hook, so use it only as a development or debugging tool.
Hooks provide powerful capabilities for Windows-based applications. These applications can use hooks to:
Process or modify all messages meant for all the dialog boxes, message boxes, scroll bars, or menus for an application (WH_MSGFILTER).
Process or modify all messages meant for all the dialog boxes, message boxes, scroll bars, or menus for the system (WH_SYSMSGFILTER).
Process or modify all messages (of any type) for the system whenever a GetMessage or a PeekMessage function is called (WH_GETMESSAGE).
Process or modify all messages (of any type) whenever a SendMessage function is called (WH_CALLWNDPROC).
Record or play back keyboard and mouse events (WH_JOURNALRECORD, WH_JOURNALPLAYBACK).
Process, modify, or remove keyboard events (WH_KEYBOARD).
Process, modify, or discard mouse events (WH_MOUSE).
Respond to certain system actions, making it possible to develop computer-based training (CBT) for applications (WH_CBT).
Prevent another filter from being called (WH_DEBUG).