Nikolay Sivov : comctl32/tests: Use CreateWindowEx() to create UpDown controls.

Alexandre Julliard julliard at winehq.org
Thu Dec 21 16:37:26 CST 2017


Module: wine
Branch: master
Commit: 9e66be57b040b4c12aeb6220382b281d855bbd55
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=9e66be57b040b4c12aeb6220382b281d855bbd55

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Thu Dec 21 12:14:43 2017 +0300

comctl32/tests: Use CreateWindowEx() to create UpDown controls.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/comctl32/tests/updown.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/dlls/comctl32/tests/updown.c b/dlls/comctl32/tests/updown.c
index 3076285..d6dbde0 100644
--- a/dlls/comctl32/tests/updown.c
+++ b/dlls/comctl32/tests/updown.c
@@ -293,11 +293,16 @@ static HWND create_updown_control(DWORD style, HWND buddy)
     RECT rect;
 
     GetClientRect(parent_wnd, &rect);
-    updown = CreateUpDownControl(WS_CHILD | WS_BORDER | WS_VISIBLE | style,
-                                 0, 0, rect.right, rect.bottom, parent_wnd, 1, GetModuleHandleA(NULL), buddy,
-                                 100, 0, 50);
+    updown = CreateWindowExA(0, UPDOWN_CLASSA, NULL, WS_CHILD | WS_BORDER | WS_VISIBLE | style,
+                           0, 0, rect.right, rect.bottom,
+                           parent_wnd, (HMENU)1, GetModuleHandleA(NULL), NULL);
+    ok(updown != NULL, "Failed to create UpDown control.\n");
     if (!updown) return NULL;
 
+    SendMessageA(updown, UDM_SETBUDDY, (WPARAM)buddy, 0);
+    SendMessageA(updown, UDM_SETRANGE, 0, MAKELONG(100, 0));
+    SendMessageA(updown, UDM_SETPOS, 0, MAKELONG(50, 0));
+
     oldproc = (WNDPROC)SetWindowLongPtrA(updown, GWLP_WNDPROC,
                                          (LONG_PTR)updown_subclass_proc);
     SetWindowLongPtrA(updown, GWLP_USERDATA, (LONG_PTR)oldproc);




More information about the wine-cvs mailing list