wxSpinButton::GetValue() returns correct result now

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-06-24 22:05:15 +00:00
parent 96d3780753
commit d1d7cdff87

View File

@@ -117,19 +117,19 @@ wxSpinButton::~wxSpinButton()
int wxSpinButton::GetValue() const int wxSpinButton::GetValue() const
{ {
return (int) ::SendMessage((HWND) GetHWND(), UDM_GETPOS, 0, 0); return LOWORD(::SendMessage(GetHwnd(), UDM_GETPOS, 0, 0));
} }
void wxSpinButton::SetValue(int val) void wxSpinButton::SetValue(int val)
{ {
::SendMessage((HWND) GetHWND(), UDM_SETPOS, 0, (LPARAM) MAKELONG((short) val, 0)); ::SendMessage(GetHwnd(), UDM_SETPOS, 0, (LPARAM) MAKELONG((short) val, 0));
} }
void wxSpinButton::SetRange(int minVal, int maxVal) void wxSpinButton::SetRange(int minVal, int maxVal)
{ {
m_min = minVal; m_min = minVal;
m_max = maxVal; m_max = maxVal;
::SendMessage((HWND) GetHWND(), UDM_SETRANGE, 0, ::SendMessage(GetHwnd(), UDM_SETRANGE, 0,
(LPARAM) MAKELONG((short)maxVal, (short)minVal)); (LPARAM) MAKELONG((short)maxVal, (short)minVal));
} }