// the main difficulty we have here is with the controls in the toolbars:
// as we (sometimes) use several separators to cover up the space used by
// them, the indices are not the same for us and the toolbar
// the main difficulty we have here is with the controls in the toolbars:
// as we (sometimes) use several separators to cover up the space used by
// them, the indices are not the same for us and the toolbar
RECT r;
if ( !::SendMessage(GetHwnd(), TB_GETITEMRECT, pos, (LPARAM)&r) )
{
RECT r;
if ( !::SendMessage(GetHwnd(), TB_GETITEMRECT, pos, (LPARAM)&r) )
{
if ( !tool->CanBeToggled() || tool->GetKind() != wxITEM_RADIO || toggled )
{
// OnLeftClick() can veto the button state change - for buttons which
if ( !tool->CanBeToggled() || tool->GetKind() != wxITEM_RADIO || toggled )
{
// OnLeftClick() can veto the button state change - for buttons which