X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/edccf4281bc8fbb9d8151240ba5b208339c9ac11..4e57b0d49515043e7b4083eb596ac5044ccb950e:/src/msw/button.cpp diff --git a/src/msw/button.cpp b/src/msw/button.cpp index 4a5a7bbf4e..1d8bbaf990 100644 --- a/src/msw/button.cpp +++ b/src/msw/button.cpp @@ -201,9 +201,12 @@ void wxButton::Command(wxCommandEvent & event) bool wxButton::MSWCommand(WXUINT param, WXWORD id) { bool processed = FALSE; - if ( param == BN_CLICKED || param == 1 ) // 1 for accelerator + switch ( param ) { - processed = SendClickEvent(); + case 1: // 1 for accelerator + case BN_CLICKED: + processed = SendClickEvent(); + break; } return processed;