// the id is probably invalid?
wxLogLastError("TB_SETBUTTONINFO");
}
-
}
else
#endif // comctl32.dll 4.71
TBBUTTON tbb;
wxZeroMemory(tbb);
tbb.idCommand = 0;
- tbb.fsState = TBSTATE_ENABLED;
+ tbb.fsState = TBSTATE_ENABLED | TBSTATE_HIDDEN;
tbb.fsStyle = TBSTYLE_SEP;
size_t nSeparators = size.x / widthSep;
void wxToolBar::UpdateSize()
{
- // we must refresh the frame after the toolbar size (possibly) changed
+ // the toolbar size changed
+ SendMessage(GetHwnd(), TB_AUTOSIZE, 0, 0);
+
+ // we must also refresh the frame after the toolbar size (possibly) changed
wxFrame *frame = wxDynamicCast(GetParent(), wxFrame);
if ( frame )
{
(void)::SendMessage(GetHwndOf(frame), WM_SIZE, SIZE_RESTORED,
MAKELPARAM(r.right - r.left, r.bottom - r.top));
}
-
}
// ----------------------------------------------------------------------------