Commit 1cd5e694 authored by Sergey Guralnik's avatar Sergey Guralnik Committed by Alexandre Julliard

user32: Init standard scrollbars during WM_NCCREATE.

parent 899392b3
...@@ -837,6 +837,13 @@ LRESULT WINAPI DefWindowProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ...@@ -837,6 +837,13 @@ LRESULT WINAPI DefWindowProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam
if (!IS_INTRESOURCE(cs->lpszName)) if (!IS_INTRESOURCE(cs->lpszName))
DEFWND_SetTextA( hwnd, cs->lpszName ); DEFWND_SetTextA( hwnd, cs->lpszName );
result = 1; result = 1;
if(cs->style & (WS_HSCROLL | WS_VSCROLL))
{
SCROLLINFO si = {sizeof si, SIF_ALL, 0, 100, 0, 0, 0};
SetScrollInfo( hwnd, SB_HORZ, &si, FALSE );
SetScrollInfo( hwnd, SB_VERT, &si, FALSE );
}
} }
break; break;
...@@ -984,6 +991,13 @@ LRESULT WINAPI DefWindowProcW( ...@@ -984,6 +991,13 @@ LRESULT WINAPI DefWindowProcW(
if (!IS_INTRESOURCE(cs->lpszName)) if (!IS_INTRESOURCE(cs->lpszName))
DEFWND_SetTextW( hwnd, cs->lpszName ); DEFWND_SetTextW( hwnd, cs->lpszName );
result = 1; result = 1;
if(cs->style & (WS_HSCROLL | WS_VSCROLL))
{
SCROLLINFO si = {sizeof si, SIF_ALL, 0, 100, 0, 0, 0};
SetScrollInfo( hwnd, SB_HORZ, &si, FALSE );
SetScrollInfo( hwnd, SB_VERT, &si, FALSE );
}
} }
break; break;
......
...@@ -241,7 +241,6 @@ static void scrollbar_test_default( DWORD style) ...@@ -241,7 +241,6 @@ static void scrollbar_test_default( DWORD style)
ok( min == 0 && max == 0, ok( min == 0 && max == 0,
"Scroll bar range is %d,%d. Expected 0,0. Style %08x\n", min, max, style); "Scroll bar range is %d,%d. Expected 0,0. Style %08x\n", min, max, style);
else else
todo_wine
ok(( min == 0 && max == 100) || ok(( min == 0 && max == 100) ||
broken( min == 0 && max == 0), /* Win 9x/ME */ broken( min == 0 && max == 0), /* Win 9x/ME */
"Scroll bar range is %d,%d. Expected 0,100. Style %08x\n", min, max, style); "Scroll bar range is %d,%d. Expected 0,100. Style %08x\n", min, max, style);
...@@ -253,7 +252,6 @@ todo_wine ...@@ -253,7 +252,6 @@ todo_wine
ok( min == 0 && max == 0, ok( min == 0 && max == 0,
"Scroll bar range is %d,%d. Expected 0,0. Style %08x\n", min, max, style); "Scroll bar range is %d,%d. Expected 0,0. Style %08x\n", min, max, style);
else else
todo_wine
ok(( min == 0 && max == 100) || ok(( min == 0 && max == 100) ||
broken( min == 0 && max == 0), /* Win 9x/ME */ broken( min == 0 && max == 0), /* Win 9x/ME */
"Scroll bar range is %d,%d. Expected 0,100. Style %08x\n", min, max, style); "Scroll bar range is %d,%d. Expected 0,100. Style %08x\n", min, max, style);
...@@ -263,7 +261,6 @@ todo_wine ...@@ -263,7 +261,6 @@ todo_wine
if( !( style & ( WS_VSCROLL | WS_HSCROLL))) if( !( style & ( WS_VSCROLL | WS_HSCROLL)))
ok( !ret, "GetScrollInfo succeeded unexpectedly. Style is %08x\n", style); ok( !ret, "GetScrollInfo succeeded unexpectedly. Style is %08x\n", style);
else else
todo_wine
ok( ret || ok( ret ||
broken( !ret), /* Win 9x/ME */ broken( !ret), /* Win 9x/ME */
"GetScrollInfo failed unexpectedly. Style is %08x\n", style); "GetScrollInfo failed unexpectedly. Style is %08x\n", style);
...@@ -273,7 +270,6 @@ todo_wine ...@@ -273,7 +270,6 @@ todo_wine
if( !( style & ( WS_VSCROLL | WS_HSCROLL))) if( !( style & ( WS_VSCROLL | WS_HSCROLL)))
ok( !ret, "GetScrollInfo succeeded unexpectedly. Style is %08x\n", style); ok( !ret, "GetScrollInfo succeeded unexpectedly. Style is %08x\n", style);
else else
todo_wine
ok( ret || ok( ret ||
broken( !ret), /* Win 9x/ME */ broken( !ret), /* Win 9x/ME */
"GetScrollInfo failed unexpectedly. Style is %08x\n", style); "GetScrollInfo failed unexpectedly. Style is %08x\n", style);
...@@ -423,15 +419,12 @@ static LRESULT CALLBACK scroll_init_proc(HWND hwnd, UINT msg, ...@@ -423,15 +419,12 @@ static LRESULT CALLBACK scroll_init_proc(HWND hwnd, UINT msg,
/* WM_NCCREATE was passed to DefWindowProc */ /* WM_NCCREATE was passed to DefWindowProc */
if(cs->style & (WS_VSCROLL | WS_HSCROLL)) if(cs->style & (WS_VSCROLL | WS_HSCROLL))
{ {
todo_wine ok(h_ret && v_ret, "GetScrollInfo() should return NON-zero "
ok(h_ret && v_ret, "GetScrollInfo() should return NON-zero "
"but got h_ret=%d v_ret=%d\n", h_ret, v_ret); "but got h_ret=%d v_ret=%d\n", h_ret, v_ret);
todo_wine ok(vert.nMin == 0 && vert.nMax == 100,
ok(vert.nMin == 0 && vert.nMax == 100,
"unexpected init values(SB_VERT): min=%d max=%d\n", "unexpected init values(SB_VERT): min=%d max=%d\n",
vert.nMin, vert.nMax); vert.nMin, vert.nMax);
todo_wine ok(horz.nMin == 0 && horz.nMax == 100,
ok(horz.nMin == 0 && horz.nMax == 100,
"unexpected init values(SB_HORZ): min=%d max=%d\n", "unexpected init values(SB_HORZ): min=%d max=%d\n",
horz.nMin, horz.nMax); horz.nMin, horz.nMax);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment