diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index 721124a0aa..9c0ec13209 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -630,6 +630,8 @@ bool wxToolBar::Realize() // default to be consistent with wxGTK and the menu // radio items button.fsState |= TBSTATE_CHECKED; + + tool->Toggle(TRUE); } isRadio = TRUE; @@ -829,6 +831,13 @@ bool wxToolBar::MSWCommand(WXUINT WXUNUSED(cmd), WXWORD id) bool toggled = tool->IsToggled(); + // avoid sending the event when a radio button is released, this is not + // interesting + if ( tool->CanBeToggled() && tool->GetKind() == wxITEM_RADIO && !toggled ) + { + return; + } + // OnLeftClick() can veto the button state change - for buttons which may // be toggled only, of couse if ( !OnLeftClick((int)id, toggled) && tool->CanBeToggled() )