Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
674c302c
Commit
674c302c
authored
Jun 14, 2004
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jun 14, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make SetScrollRange behave like GetScrollRange does, i.e. send
messages to the control for SB_CTL case.
parent
8b0b70ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
20 deletions
+42
-20
scroll.c
controls/scroll.c
+42
-20
No files found.
controls/scroll.c
View file @
674c302c
...
...
@@ -1211,6 +1211,28 @@ LPINT lpMax /* [out] Where to store maximum value */)
}
/*************************************************************************
* SCROLL_SetScrollRange
*
*/
static
BOOL
SCROLL_SetScrollRange
(
HWND
hwnd
,
/* [in] Handle of window */
INT
nBar
,
/* [in] One of SB_HORZ, SB_VERT, or SB_CTL */
INT
minVal
,
/* [out] minimum value */
INT
maxVal
/* [out] maximum value */
)
{
LPSCROLLBAR_INFO
infoPtr
=
SCROLL_GetScrollBarInfo
(
hwnd
,
nBar
);
TRACE
(
"hwnd=%p nBar=%d min=%d max=%d
\n
"
,
hwnd
,
nBar
,
minVal
,
maxVal
);
if
(
infoPtr
)
{
infoPtr
->
minVal
=
minVal
;
infoPtr
->
maxVal
=
maxVal
;
}
return
infoPtr
?
TRUE
:
FALSE
;
}
/***********************************************************************
* ScrollBarWndProc
...
...
@@ -1340,14 +1362,17 @@ static LRESULT WINAPI ScrollBarWndProc( HWND hwnd, UINT message, WPARAM wParam,
return
SCROLL_GetScrollPos
(
hwnd
,
SB_CTL
);
case
SBM_SETRANGE16
:
SetScrollRange
(
hwnd
,
SB_CTL
,
LOWORD
(
lParam
),
HIWORD
(
lParam
),
wParam
/* FIXME: Is this correct? */
);
return
0
;
if
(
wParam
)
message
=
SBM_SETRANGEREDRAW
;
wParam
=
LOWORD
(
lParam
);
lParam
=
HIWORD
(
lParam
);
/* fall through */
case
SBM_SETRANGEREDRAW
:
case
SBM_SETRANGE
:
{
INT
oldPos
=
SCROLL_GetScrollPos
(
hwnd
,
SB_CTL
);
SetScrollRange
(
hwnd
,
SB_CTL
,
wParam
,
lParam
,
FALSE
);
SCROLL_SetScrollRange
(
hwnd
,
SB_CTL
,
wParam
,
lParam
);
if
(
message
==
SBM_SETRANGEREDRAW
)
SCROLL_RefreshScrollBar
(
hwnd
,
SB_CTL
,
TRUE
,
TRUE
);
if
(
oldPos
!=
SCROLL_GetScrollPos
(
hwnd
,
SB_CTL
))
return
oldPos
;
}
return
0
;
...
...
@@ -1363,14 +1388,6 @@ static LRESULT WINAPI ScrollBarWndProc( HWND hwnd, UINT message, WPARAM wParam,
case
SBM_ENABLE_ARROWS
:
return
EnableScrollBar
(
hwnd
,
SB_CTL
,
wParam
);
case
SBM_SETRANGEREDRAW
:
{
INT
oldPos
=
SCROLL_GetScrollPos
(
hwnd
,
SB_CTL
);
SetScrollRange
(
hwnd
,
SB_CTL
,
wParam
,
lParam
,
TRUE
);
if
(
oldPos
!=
SCROLL_GetScrollPos
(
hwnd
,
SB_CTL
))
return
oldPos
;
}
return
0
;
case
SBM_SETSCROLLINFO
:
return
SetScrollInfo
(
hwnd
,
SB_CTL
,
(
SCROLLINFO
*
)
lParam
,
wParam
);
...
...
@@ -1665,14 +1682,19 @@ INT minVal, /* [in] New minimum value */
INT
maxVal
,
/* [in] New maximum value */
BOOL
bRedraw
/* [in] Should scrollbar be redrawn afterwards ? */
)
{
SCROLLINFO
info
;
BOOL
ret
;
info
.
cbSize
=
sizeof
(
info
);
info
.
nMin
=
minVal
;
info
.
nMax
=
maxVal
;
info
.
fMask
=
SIF_RANGE
;
SetScrollInfo
(
hwnd
,
nBar
,
&
info
,
bRedraw
);
return
TRUE
;
TRACE
(
"hwnd=%p nBar=%d min=%d max=%d
\n
"
,
hwnd
,
nBar
,
minVal
,
maxVal
);
/* Refer SB_CTL requests to the window */
if
(
nBar
==
SB_CTL
)
ret
=
SendMessageW
(
hwnd
,
SBM_SETRANGE
,
minVal
,
maxVal
);
else
ret
=
SCROLL_SetScrollRange
(
hwnd
,
nBar
,
minVal
,
maxVal
);
if
(
bRedraw
)
SCROLL_RefreshScrollBar
(
hwnd
,
SB_CTL
,
TRUE
,
TRUE
);
return
ret
;
}
...
...
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