git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32874
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
LRESULT state = ::SendMessage(GetHwnd(), TB_GETSTATE, id, 0);
toggled = (state & TBSTATE_CHECKED) != 0;
LRESULT state = ::SendMessage(GetHwnd(), TB_GETSTATE, id, 0);
toggled = (state & TBSTATE_CHECKED) != 0;
- // ignore the event when a radio button is released, as this doesn't seem to
- // happen at all, and is handled otherwise
+ // ignore the event when a radio button is released, as this doesn't
+ // seem to happen at all, and is handled otherwise
if ( tool->GetKind() == wxITEM_RADIO && !toggled )
return true;
if ( tool->GetKind() == wxITEM_RADIO && !toggled )
return true;
// revert back
tool->Toggle(!toggled);
// revert back
tool->Toggle(!toggled);
- ::SendMessage(GetHwnd(), TB_CHECKBUTTON, id, MAKELONG(toggled, 0));
+ ::SendMessage(GetHwnd(), TB_CHECKBUTTON, id, MAKELONG(!toggled, 0));