diff -u -N -r source-old/dll/win32/comctl32/updown.c source/dll/win32/comctl32/updown.c --- source-old/dll/win32/comctl32/updown.c Sun Apr 18 13:00:19 2010 +++ source/dll/win32/comctl32/updown.c Tue May 4 10:11:07 2010 @@ -414,7 +414,8 @@ (infoPtr->dwStyle & UDS_HORZ ? DFCS_SCROLLRIGHT : DFCS_SCROLLUP) | ((infoPtr->dwStyle & UDS_HOTTRACK) && uHot ? DFCS_HOT : 0) | (uPressed ? DFCS_PUSHED : 0) | - (infoPtr->dwStyle & WS_DISABLED ? DFCS_INACTIVE : 0) ); + ((infoPtr->dwStyle & WS_DISABLED) || + infoPtr->MinVal == infoPtr->MaxVal ? DFCS_INACTIVE : 0) ); } /* Draw the decr button */ @@ -426,7 +427,8 @@ (infoPtr->dwStyle & UDS_HORZ ? DFCS_SCROLLLEFT : DFCS_SCROLLDOWN) | ((infoPtr->dwStyle & UDS_HOTTRACK) && dHot ? DFCS_HOT : 0) | (dPressed ? DFCS_PUSHED : 0) | - (infoPtr->dwStyle & WS_DISABLED ? DFCS_INACTIVE : 0) ); + ((infoPtr->dwStyle & WS_DISABLED) || + infoPtr->MinVal == infoPtr->MaxVal ? DFCS_INACTIVE : 0) ); } return 0; @@ -474,11 +476,6 @@ * UPDOWN_SetRange * * Handle UDM_SETRANGE, UDM_SETRANGE32 - * - * FIXME: handle Max == Min properly: - * - arrows should be disabled (without WS_DISABLED set), - * visually they can't be pressed and don't respond; - * - all input messages should still pass in. */ static LRESULT UPDOWN_SetRange(UPDOWN_INFO *infoPtr, INT Max, INT Min) { @@ -500,6 +497,9 @@ { int iWheelDelta = GET_WHEEL_DELTA_WPARAM(wParam) / WHEEL_DELTA; + if (infoPtr->MinVal == infoPtr->MaxVal) + return 0; + if (wParam & (MK_SHIFT | MK_CONTROL)) return 0; @@ -760,6 +760,9 @@ TRACKMOUSEEVENT tme; TRACE("msg %04x point %s\n", msg, wine_dbgstr_point(&pt)); + + if (infoPtr->MinVal == infoPtr->MaxVal) + return; switch(msg) {