X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/debe6624c1e9d4bf3243381153d1e173c849bcd8..a3ef5bf5045991260005634272633717c0a26174:/src/msw/spinbutt.cpp?ds=inline diff --git a/src/msw/spinbutt.cpp b/src/msw/spinbutt.cpp index a34bd654c4..bb3e75b68d 100644 --- a/src/msw/spinbutt.cpp +++ b/src/msw/spinbutt.cpp @@ -21,7 +21,7 @@ #endif #ifndef WX_PRECOMP -#include "wx.h" +#include "wx/wx.h" #endif #if defined(__WIN95__) @@ -47,8 +47,8 @@ bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, c long style, const wxString& name) { wxSystemSettings settings; - m_backgroundColour = parent->GetDefaultBackgroundColour() ; - m_foregroundColour = parent->GetDefaultForegroundColour() ; + m_backgroundColour = parent->GetBackgroundColour() ; + m_foregroundColour = parent->GetForegroundColour() ; SetName(name); @@ -91,7 +91,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 +126,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) @@ -233,26 +234,23 @@ bool wxSpinButton::MSWCommand(WXUINT cmd, WXWORD id) return FALSE; } -bool wxSpinButton::MSWNotify(WXWPARAM wParam, WXLPARAM lParam) +bool wxSpinButton::MSWNotify(WXWPARAM wParam, WXLPARAM lParam, WXLPARAM* result) { NMHDR* hdr1 = (NMHDR*) lParam; switch ( hdr1->code ) { -/* We don't process this message, currently */ + /* We don't process this message, currently */ case UDN_DELTAPOS: - { - return wxControl::MSWNotify(wParam, lParam); - break; - } + default : - return wxControl::MSWNotify(wParam, lParam); + return wxControl::MSWNotify(wParam, lParam, result); break; } /* event.eventObject = this; event.SetEventType(eventType); - if ( !ProcessEvent(event) ) + if ( !GetEventHandler()->ProcessEvent(event) ) return FALSE; */ return TRUE;