comctl32/tests: Use CreateWindowEx() to create UpDown controls.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d95be60ff6
commit
9e66be57b0
|
@ -293,11 +293,16 @@ static HWND create_updown_control(DWORD style, HWND buddy)
|
||||||
RECT rect;
|
RECT rect;
|
||||||
|
|
||||||
GetClientRect(parent_wnd, &rect);
|
GetClientRect(parent_wnd, &rect);
|
||||||
updown = CreateUpDownControl(WS_CHILD | WS_BORDER | WS_VISIBLE | style,
|
updown = CreateWindowExA(0, UPDOWN_CLASSA, NULL, WS_CHILD | WS_BORDER | WS_VISIBLE | style,
|
||||||
0, 0, rect.right, rect.bottom, parent_wnd, 1, GetModuleHandleA(NULL), buddy,
|
0, 0, rect.right, rect.bottom,
|
||||||
100, 0, 50);
|
parent_wnd, (HMENU)1, GetModuleHandleA(NULL), NULL);
|
||||||
|
ok(updown != NULL, "Failed to create UpDown control.\n");
|
||||||
if (!updown) return NULL;
|
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,
|
oldproc = (WNDPROC)SetWindowLongPtrA(updown, GWLP_WNDPROC,
|
||||||
(LONG_PTR)updown_subclass_proc);
|
(LONG_PTR)updown_subclass_proc);
|
||||||
SetWindowLongPtrA(updown, GWLP_USERDATA, (LONG_PTR)oldproc);
|
SetWindowLongPtrA(updown, GWLP_USERDATA, (LONG_PTR)oldproc);
|
||||||
|
|
Loading…
Reference in New Issue