c# - Why all the event checks in the ButtonBase WndProc method, .Net WinForms -


I am creating a base class for a button that comes out of control in opposing the buttonbus.
To see ButtonBase to reflect I am using, make sure that I do not ignore any important thing and am surprised by the contents of the WndProc method.
There is check, click and capture for things like buttons, which can be told as far as I can tell that all of the classes are handled within the 'On' methods.

Does anyone know why he is there?

This is a cover for the original Windows Button control in a nutshell:

  • 0x00f5 = BM_CLICK: Run OnClick ()
  • 0x2111 = BN_CLICKED Notification: Run OnClick ()
  • Deal with a bunch of workaround owner scare.

You do not need to worry about it because you do not wrap the original button and do not require a master draw. Make sure that you implement IButtonControl so that your buttons behave properly when the Enter and Escape is pressed and it is selected as the form of accept / cancel form of the form is not strictly required, but when you have control Instead of using buttonbase, it is automatic.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -