[7/7] comctl32/updown: Update buddy on base change
Nikolay Sivov
bunglehead at gmail.com
Sun Sep 20 15:02:56 CDT 2009
Changelog:
- Update buddy on base change
>From 840f1d41468d77444379786e19852c2590baf1cf Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Sun, 20 Sep 2009 14:05:18 +0400
Subject: Update buddy on base change
---
dlls/comctl32/tests/updown.c | 2 +-
dlls/comctl32/updown.c | 8 ++++++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/tests/updown.c b/dlls/comctl32/tests/updown.c
index 6d0e679..104d3c8 100644
--- a/dlls/comctl32/tests/updown.c
+++ b/dlls/comctl32/tests/updown.c
@@ -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);
}
diff --git a/dlls/comctl32/updown.c b/dlls/comctl32/updown.c
index efec19b..cfce64e 100644
--- a/dlls/comctl32/updown.c
+++ b/dlls/comctl32/updown.c
@@ -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;
--
1.5.6.5
More information about the wine-patches
mailing list