why message reflection?

Hi,

I wonder why win32 controls use message reflection, for example, button doesn't get the click message, instead the message is sent to its parent window as WM_COMMAND. Why button can't capture the click event since it can capture normal events like WM_SIZE? Why button, tab and such controls uses message reflection?

Thanks.
Because its the parent than handles a button press, not the button.

The fact is, the button handles mouse messages and sends the click or double click events to the parent.

The button is interested in drawing itself, the parent is interested in performing some application logic.
Last edited on
Topic archived. No new replies allowed.