Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1cd5e694
Commit
1cd5e694
authored
Jan 23, 2013
by
Sergey Guralnik
Committed by
Alexandre Julliard
Jan 24, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Init standard scrollbars during WM_NCCREATE.
parent
899392b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
10 deletions
+17
-10
defwnd.c
dlls/user32/defwnd.c
+14
-0
scroll.c
dlls/user32/tests/scroll.c
+3
-10
No files found.
dlls/user32/defwnd.c
View file @
1cd5e694
...
@@ -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
;
...
...
dlls/user32/tests/scroll.c
View file @
1cd5e694
...
@@ -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
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment