Setting a Breakpoint on a Message Received by a Windows Function
You can set message breakpoints to stop the debugger when a particular WndProc function message is received.
Note Message breakpoints work only on x86- or Pentium-based systems.
To set a breakpoint on a message
From the Edit menu, click Breakpoints.
The Breakpoints dialog box appears.
Click the Messages tab.
In the Break At WndProc text box, type the name of the Windows function.
If you are setting a breakpoint during a debug session, the list contains the exported functions in your project.
In the Set One Breakpoint For Each Message To Watch list box, select the message.
To set another breakpoint, press ENTER, and then repeat steps 3 and 4.
The Breakpoints list displays the currently active breakpoints.
Click OK to set the breakpoints.
Note If you interrupt execution while Windows or other system code is running, the results can be unpredictable.