X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fd3f686c274a264e89ea97505350a82c1134f307..9d2f3c71d83c52fc4db6c8041de533562816b1d6:/src/msw/spinbutt.cpp diff --git a/src/msw/spinbutt.cpp b/src/msw/spinbutt.cpp index 89680b5f5e..03657deaa0 100644 --- a/src/msw/spinbutt.cpp +++ b/src/msw/spinbutt.cpp @@ -21,15 +21,18 @@ #endif #ifndef WX_PRECOMP -#include "wx.h" +#include "wx/wx.h" #endif -#if defined(__WIN95__) +// Can't resolve reference to CreateUpDownControl in +// TWIN32, but could probably use normal CreateWindow instead. + +#if defined(__WIN95__) && !defined(__TWIN32__) #include "wx/spinbutt.h" #include "wx/msw/private.h" -#ifndef __GNUWIN32__ +#if !defined(__GNUWIN32__) || defined(__TWIN32__) #include #endif @@ -91,7 +94,7 @@ bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, c m_windowId, wxGetInstance(), 0, - m_min, m_max, 0); + m_min, m_max, m_min); m_hWnd = (WXHWND) hWndListControl; if (parent) parent->AddChild(this); @@ -126,7 +129,8 @@ void wxSpinButton::SetRange(int minVal, int maxVal) { m_min = minVal; m_max = maxVal; - ::SendMessage((HWND) GetHWND(), UDM_SETRANGE, 0, (LPARAM) MAKELONG((short) minVal, (short) maxVal)); + ::SendMessage((HWND) GetHWND(), UDM_SETRANGE, 0, + (LPARAM) MAKELONG((short)maxVal, (short)minVal)); } void wxSpinButton::MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control)