Convert message ID to a string
Posted
by Craig Lucas
on August 26th, 1998
CWindowsMessageToString msgConverter; LPSTR lpszMsg = msgConverter.GetStringFromMsg( WM_COMMAND ); MessageBox( lpszMessage );This would pop up a messagebox that would say "WM_COMMAND".
I think this class will be useful when you have a function that is handling many messages like PreTranslateMsg. You can also pass 0 as the second parameter to GetStringFromMsg to prevent the function from returning strings for frequently send message.
Date Posted: 08/27/98

Comments
Decoding window messages
Posted by Legacy on 06/19/1999 12:00amOriginally posted by: Jay Bazuzi
If you want to decode a window message in the debugger, you can use the ",wm" format specifier in watch and quickwatch. Like this:
uMsg,wm
and you'll get things like "WM_COMMAND".
Reply