I know that a Button, when clicked, sends the WM_COMMAND message to it's parent, but what message does it receive that makes it send this message? I am overriding the default WndProc of a button and the button does not receive the WM_COMMAND message, so I need to know what message causes a button to send the WM_COMMAND message so I can replicate that functionality.
I found that it's actually a combination of WM_LBUTTONDOWN, WM_MOUSELEAVE, and a few other things. For example, the WM_COMMAND will only be fired if the mouse was depressed on the button, and is still on the button when WM_LBUTTONUP is fired. As for space, enter, etc, I believe it just handles the VK_ENTER message and stuff.