You can trace occurrences of a Windows message or an entire class of Windows messages by using the wwm (Windows Watch Message) command. CVW displays the messages in the CVW Command window.
To trace a Windows message or message class, type the wwm command in the Command window. The syntax for the command is as follows:
wwm winproc msgname | msgclasses
The winproc parameter is the symbol name or address of an application's window procedure. The msgname parameter is the name of a Windows message, such as WM_PAINT. The msgclasses parameter is a string of characters that identify one or more classes of messages to be traced. If msgclasses is not specified, CVW traces all message classes. The class, if specified, is consistent with those defined in Microsoft Windows Spy (SPY.EXE); they are as follows:
Message class | Type of Windows message |
c | Clipboard |
d | DDE |
i | Initialization |
m | Mouse |
n | Input |
s | System |
w | Window management |
z | Nonclient |
For example, the following command traces all mouse and input messages sent to the MainWndProc procedure:
wwm MainWndProc mn
The following example illustrates how the CVW Command window displays a Windows message:
HWND:lc00 wParm:0000 lParm:000000 msg:000F WM_PAINT