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
67630d0f
Commit
67630d0f
authored
Jul 03, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 05, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Use GetScrollInfo for GetScrollPos implementation.
parent
48441212
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
22 deletions
+10
-22
scroll.c
dlls/user32/scroll.c
+10
-22
No files found.
dlls/user32/scroll.c
View file @
67630d0f
...
...
@@ -312,22 +312,6 @@ void WINAPI USER_ScrollBarDraw( HWND hwnd, HDC hdc, INT nBar, enum SCROLL_HITTES
}
/*************************************************************************
* SCROLL_GetScrollPos
*
* Internal helper for the API function
*
* PARAMS
* hwnd [I] Handle of window with scrollbar(s)
* nBar [I] One of SB_HORZ, SB_VERT, or SB_CTL
*/
static
INT
SCROLL_GetScrollPos
(
HWND
hwnd
,
INT
nBar
)
{
LPSCROLLBAR_INFO
infoPtr
=
SCROLL_GetInternalInfo
(
hwnd
,
nBar
,
FALSE
);
return
infoPtr
?
infoPtr
->
curVal
:
0
;
}
/*************************************************************************
* SCROLL_GetScrollRange
*
* Internal helper for the API function
...
...
@@ -483,15 +467,19 @@ int WINAPI DECLSPEC_HOTPATCH SetScrollPos( HWND hwnd, int bar, int pos, BOOL red
* There is ambiguity when 0 is returned. Use GetLastError
* to make sure there was an error (and to know which one).
*/
INT
WINAPI
DECLSPEC_HOTPATCH
GetScrollPos
(
HWND
hwnd
,
INT
nBar
)
int
WINAPI
DECLSPEC_HOTPATCH
GetScrollPos
(
HWND
hwnd
,
int
bar
)
{
TRACE
(
"hwnd=%p nBar=%d
\n
"
,
hwnd
,
nBar
);
SCROLLINFO
info
;
TRACE
(
"hwnd=%p bar=%d
\n
"
,
hwnd
,
bar
);
/* Refer SB_CTL requests to the window */
if
(
nBar
==
SB_CTL
)
return
SendMessageW
(
hwnd
,
SBM_GETPOS
,
0
,
0
);
else
return
SCROLL_GetScrollPos
(
hwnd
,
nBar
);
if
(
bar
==
SB_CTL
)
return
SendMessageW
(
hwnd
,
SBM_GETPOS
,
0
,
0
);
info
.
cbSize
=
sizeof
(
info
);
info
.
fMask
=
SIF_POS
;
return
GetScrollInfo
(
hwnd
,
bar
,
&
info
)
?
info
.
nPos
:
0
;
}
...
...
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