Fixed a bug so the toggle flag is set correctly

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5249 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2000-01-05 04:51:14 +00:00
parent 4f40f5e370
commit 82dd98a702

View File

@@ -655,7 +655,7 @@ bool wxToolBar::MSWCommand(WXUINT cmd, WXWORD id)
if ( tool->CanBeToggled() )
{
LRESULT state = ::SendMessage(GetHwnd(), TB_GETSTATE, id, 0);
tool->SetToggle((state & TBSTATE_CHECKED) != 0);
tool->Toggle((state & TBSTATE_CHECKED) != 0);
}
bool toggled = tool->IsToggled();