Looking for a program to view Windows messages - windows

I am looking for a program to view Windows messages
Can you help?

Spy++ comes with Visual Studio.

I have found Winspector to be somewhat more stable than Spy++ especially while debugging a program while at the same time monitoring messages.

Related

How to filter Visual Studio 2008 output window

I'm looking for a way to filter the messages coming out from OutputDebugString into the Output window in VS 2008. I'm modifying a large system and I'm only interested in my messages in the log.
I don't mind the output to be external to VS, in fact I would prefer if it would. Using SysInternals.DebugView I can easily filter the messages but when an app is being debugged in VS 2008 its output never reaches DebugView.
Ok, I've found an interesting plugin to VS 2008: http://vsdbgview.codeplex.com/. Seems to be working for now.

Capturing Win32 messages

Does anyone know a tool that can capture win32 messages that get sent to a particular process? I thought there was a tool from sysinternals for that but now I can't locate it. Anyone knows some?
Spy++ comes with retail version of Visual Studio (Standard, Professional, Team)
See also: I want Spy++ but I don't have Visual Studio
Try WinSpy or Winspector
If you want to do it programmatically, you need to create a message hook

How can I redirect Visual Studio’s “Output” window to DebugView?

I’m using Visual Studio 2010 to write unmanaged C++ code.
When debugging, anything printed using OutputDebugString or MFC’s TRACE macro goes to Visual Studio’s “Output” window.
I would prefer to see the output in DebugView instead, while still running under the MSVC debugger. Is this possible?
It is not possible. Whatever debugger the app runs in gets first dibs on any such messages. DebugView can only intercept the messages when the app is not running inside of any debugger.
likely not possible, by design.. if you open two DebugView instances, there's also only one receiving the messages.

Win32 Messages program

Few years ago when I was doing win32 programming, there was a program (from Microsoft I believe) that helps see all messages sent to winproc real time. I think it's a dialog box with all controls and depending of the actions you do, it display messages sent to that control.
Does anyone know which program I am talking about? If so what's the name and where can I find it. Thank you.
is it spy++
The program you are looking for is Control Spy.
As others have mentioned there is also Spy++. Source is available for a Spy++-like program called WinSpy++. (More alternatives on the thread i-want-spy-but-i-dont-have-visual-studio)
It's called Spy++.
It comes with Visual Studio, and you can find it in under Start, Programs, Microsoft Visual Studio 20xx, Visual Studio Tools.

Is it possible to communicate with the Visual Studio debugger programmatically while debugging?

I would like to control options on the debugger without using the debugging GUI's, preferably from inside the code being debugged. I would think that would be quite difficult, but maybe my debugged code can request a service from independent code that will communicate with the debugger.
This relates to another question of mine on controlling when to break on exceptions.
You can write Visual Studio macros that can do anything the GUI can, but they can get rather involved. See the MSDN documentation on Automation and Extensibility for Visual Studio
Doing this from the code being debugged would be tricky, you would definitely need some new form of communication with VS, maybe a custom add-in. I don't think an independent service would fundamentally help here. The biggest problem is that your code will stop running when the debugger breaks.
I know that you can do it with WinDBG and OutputDebugString, but for Visual Studio, I think you have to spool off another process, pipe commands to that, and have that manipulate the Debugger API.

Resources