// 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) )
{
for ( node = m_tools.GetFirst(); node; node = node->GetNext() )
{
wxToolMenuBarTool *tool = (wxToolMenuBarTool*) node->GetData();
for ( node = m_tools.GetFirst(); node; node = node->GetNext() )
{
wxToolMenuBarTool *tool = (wxToolMenuBarTool*) node->GetData();
{
n = ::CommandBar_AddBitmap( (HWND) GetHWND(), NULL, (int) (HBITMAP) bmpToUse.GetHBITMAP(),
1, 16, 16 );
{
n = ::CommandBar_AddBitmap( (HWND) GetHWND(), NULL, (int) (HBITMAP) bmpToUse.GetHBITMAP(),
1, 16, 16 );
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