// headers
// ----------------------------------------------------------------------------
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "tbar95.h"
#endif
#include "wx/msw/private.h"
-#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
- #include <commctrl.h>
-#else
- #include "wx/msw/gnuwin32/extra.h"
-#endif
-
-#include "wx/msw/missing.h"
+// include <commctrl.h> "properly"
+#include "wx/msw/wrapcctl.h"
#include "wx/app.h" // for GetComCtl32Version
-#if defined(__MWERKS__) && defined(__WXMSW__)
-// including <windef.h> for max definition doesn't seem
-// to work using CodeWarrior 6 Windows. So we define it
-// here. (Otherwise we get a undefined identifier 'max'
-// later on in this file.) (Added by dimitri@shortcut.nl)
-# ifndef max
-# define max(a,b) (((a) > (b)) ? (a) : (b))
-# endif
-
-#endif
-
// ----------------------------------------------------------------------------
// conditional compilation
// ----------------------------------------------------------------------------
// wxWin macros
// ----------------------------------------------------------------------------
-IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxToolBarBase)
+IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxControl)
+
+/*
+ TOOLBAR PROPERTIES
+ tool
+ bitmap
+ bitmap2
+ tooltip
+ longhelp
+ radio (bool)
+ toggle (bool)
+ separator
+ style ( wxNO_BORDER | wxTB_HORIZONTAL)
+ bitmapsize
+ margins
+ packing
+ separation
+
+ dontattachtoframe
+*/
BEGIN_EVENT_TABLE(wxToolBar, wxToolBarBase)
EVT_MOUSE_EVENTS(wxToolBar::OnMouseEvent)
private:
size_t m_nSepCount;
+
+ DECLARE_NO_COPY_CLASS(wxToolBarTool)
};
int left = -1;
// TB_SETBUTTONINFO message is only supported by comctl32.dll 4.71+
-#if defined(_WIN32_IE) && (_WIN32_IE >= 0x400 )
+#ifdef TB_SETBUTTONINFO
// available in headers, now check whether it is available now
// (during run-time)
if ( wxTheApp->GetComCtl32Version() >= 471 )
{
// TB_GETBUTTONSIZE is supported from version 4.70
#if defined(_WIN32_IE) && (_WIN32_IE >= 0x300 ) \
- && !( defined(__GNUWIN32__) && !wxCHECK_W32API_VERSION( 1, 0 ) )
+ && !( defined(__GNUWIN32__) && !wxCHECK_W32API_VERSION( 1, 0 ) ) \
+ && !defined (__DIGITALMARS__)
if ( wxTheApp->GetComCtl32Version() >= 470 )
{
DWORD dw = ::SendMessage(GetHwnd(), TB_GETBUTTONSIZE, 0, 0);
}
}
-bool wxToolBar::HandleSize(WXWPARAM wParam, WXLPARAM lParam)
+bool wxToolBar::HandleSize(WXWPARAM WXUNUSED(wParam), WXLPARAM lParam)
{
// calculate our minor dimension ourselves - we're confusing the standard
// logic (TB_AUTOSIZE) with our horizontal toolbars and other hacks
{
// yes, do erase it!
dc.DrawRectangle(rectItem);
+
+ // Necessary in case we use a no-paint-on-size
+ // style in the parent: the controls can disappear
+ control->Refresh(FALSE);
}
}
}
return TRUE;
}
-void wxToolBar::HandleMouseMove(WXWPARAM wParam, WXLPARAM lParam)
+void wxToolBar::HandleMouseMove(WXWPARAM WXUNUSED(wParam), WXLPARAM lParam)
{
wxCoord x = GET_X_LPARAM(lParam),
y = GET_Y_LPARAM(lParam);