git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11688
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
m_defaultWidth = DEFAULTBITMAPX;
m_defaultHeight = DEFAULTBITMAPY;
m_defaultWidth = DEFAULTBITMAPX;
m_defaultHeight = DEFAULTBITMAPY;
}
bool wxToolBar::Create(wxWindow *parent,
}
bool wxToolBar::Create(wxWindow *parent,
pt.x = x;
pt.y = y;
int index = (int)::SendMessage(GetHwnd(), TB_HITTEST, 0, (LPARAM)&pt);
pt.x = x;
pt.y = y;
int index = (int)::SendMessage(GetHwnd(), TB_HITTEST, 0, (LPARAM)&pt);
+ // MBN: when the point ( x, y ) is close to the toolbar border
+ // TB_HITTEST returns m_nButtons ( not -1 )
+ if ( index < 0 || (size_t)index >= m_nButtons )
{
// it's a separator or there is no tool at all there
return (wxToolBarToolBase *)NULL;
{
// it's a separator or there is no tool at all there
return (wxToolBarToolBase *)NULL;