// Modified by:
// Created: 22.07.99
// RCS-ID: $Id$
-// Copyright: (c) Vadim Zeitlin
+// Copyright: (c) 1999-2005 Vadim Zeitlin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#if wxUSE_SPINCTRL
-#if defined(__WIN95__)
-
#include "wx/spinctrl.h"
#include "wx/msw/private.h"
+#include "wx/msw/wrapcctl.h"
-#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
- #include <commctrl.h>
-#endif
+#if wxUSE_TOOLTIPS
+ #include "wx/tooltip.h"
+#endif // wxUSE_TOOLTIPS
#include <limits.h> // for INT_MIN
long n;
if ( (wxSscanf(val, wxT("%lu"), &n) != 1) )
n = INT_MIN;
+
+ if (n < m_min) n = m_min;
+ if (n > m_max) n = m_max;
return n;
}
::SetFocus(GetBuddyHwnd());
}
+#if wxUSE_TOOLTIPS
+
+void wxSpinCtrl::DoSetToolTip(wxToolTip *tip)
+{
+ wxSpinButton::DoSetToolTip(tip);
+
+ if ( tip )
+ tip->Add(m_hwndBuddy);
+}
+
+#endif // wxUSE_TOOLTIPS
+
// ----------------------------------------------------------------------------
// event processing
// ----------------------------------------------------------------------------
wxConstCast(this, wxSpinCtrl)->m_hWnd = hWnd;
}
-#endif // __WIN95__
-
-#endif
- // wxUSE_SPINCTRL
+#endif // wxUSE_SPINCTRL