/////////////////////////////////////////////////////////////////////////////
-// Name: msw/tbar95.cpp
+// Name: src/msw/tbar95.cpp
// Purpose: wxToolBar
// Author: Julian Smart
// Modified by:
#pragma hdrstop
#endif
+#if wxUSE_TOOLBAR && wxUSE_TOOLBAR_NATIVE && !defined(__SMARTPHONE__)
+
#ifndef WX_PRECOMP
+ #include "wx/dynarray.h"
#include "wx/frame.h"
#include "wx/log.h"
#include "wx/intl.h"
- #include "wx/dynarray.h"
#include "wx/settings.h"
#include "wx/bitmap.h"
#include "wx/dcmemory.h"
#include "wx/control.h"
+ #include "wx/app.h" // for GetComCtl32Version
#endif
-#if wxUSE_TOOLBAR && wxUSE_TOOLBAR_NATIVE && !defined(__SMARTPHONE__)
-
#include "wx/toolbar.h"
#include "wx/sysopt.h"
#include "wx/image.h"
// include <commctrl.h> "properly"
#include "wx/msw/wrapcctl.h"
-#include "wx/app.h" // for GetComCtl32Version
-
// this define controls whether the code for button colours remapping (only
// useful for 16 or 256 colour images) is active at all, it's always turned off
// for CE where it doesn't compile (and is probably not needed anyhow) and may
void wxToolBar::UpdateSize()
{
+ wxPoint pos = GetPosition();
::SendMessage(GetHwnd(), TB_AUTOSIZE, 0, 0);
+ if (pos != GetPosition())
+ Move(pos);
// In case Realize is called after the initial display (IOW the programmer
// may have rebuilt the toolbar) give the frame the option of resizing the
#endif // wxREMAP_BUTTON_COLOURS
#endif // wxUSE_TOOLBAR
-