comctl32/updown: Update buddy on base change.

This commit is contained in:
Nikolay Sivov 2009-09-20 14:05:18 +04:00 committed by Alexandre Julliard
parent 7ebca40912
commit f684bbaef7
2 changed files with 7 additions and 3 deletions

View File

@ -525,7 +525,7 @@ static void test_updown_base(void)
GetWindowTextA(edit, text, sizeof(text)/sizeof(CHAR));
/* FIXME: currently hex output isn't properly formatted, but for this
test only change from initial text matters */
todo_wine ok(lstrcmpA(text, "10") != 0, "Expected '0x000A', got '%s'\n", text);
ok(lstrcmpA(text, "10") != 0, "Expected '0x000A', got '%s'\n", text);
DestroyWindow(updown);
}

View File

@ -1037,9 +1037,13 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L
case UDM_SETBASE:
TRACE("UpDown Ctrl new base(%ld), hwnd=%p\n", wParam, hwnd);
if (wParam==10 || wParam==16) {
WPARAM temp = infoPtr->Base;
WPARAM old_base = infoPtr->Base;
infoPtr->Base = wParam;
return temp;
if (old_base != infoPtr->Base)
UPDOWN_SetBuddyInt(infoPtr);
return old_base;
}
break;