You probably know them already, but if you’re new to Win32, here are some key window messages. I would normally suggest that you commit them to memory, but if you do enough debugging, you’ll end up memorizing them anyway because you see them all the time.
0x000F |
WM_PAINT |
0x001A |
WM_WININICHANGE / WM_SETTINGCHANGE |
0x0046 |
WM_WINDOWPOSCHANGING |
0x0047 |
WM_WINDOWPOSCHANGED |
0x004E |
WM_NOTIFY |
0x010n |
WM_KEYxxx |
0x0111 |
WM_COMMAND |
0x0112 |
WM_SYSCOMMAND |
0x0113 |
WM_TIMER |
0x0200 |
WM_MOUSEMOVE |
0x020n |
WM_MOUSExxx |
0x0400 |
WM_USER |
0x8000 |
WM_APP |
0xCxxx |
RegisterWindowMessage |
I include 0x001A
in the list even though it is a low-traffic message because you do see it a lot when you are investigating hangs. The WM_SETTINGCHANGE
(which also goes by the name WM_WININICHANGE
) is a common culprit when investigating why your program has wedged: You’re broadcasting a notification and there’s a window in the system that isn’t responding.
I know that Visual Studio has a shortcut for decoding error codes. I wonder if it has one for decoding message numbers.
0 comments