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
bb0fd596
Commit
bb0fd596
authored
Nov 18, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Setting the horizontal scrollbar can change the values for the
vertical one so make sure we compute them separately.
parent
e3015641
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
11 deletions
+22
-11
listview.c
dlls/comctl32/listview.c
+22
-11
No files found.
dlls/comctl32/listview.c
View file @
bb0fd596
...
...
@@ -1513,10 +1513,6 @@ static void LISTVIEW_UpdateScroll(LISTVIEW_INFO *infoPtr)
horzInfo
.
cbSize
=
sizeof
(
SCROLLINFO
);
horzInfo
.
nPage
=
infoPtr
->
rcList
.
right
-
infoPtr
->
rcList
.
left
;
ZeroMemory
(
&
vertInfo
,
sizeof
(
SCROLLINFO
));
vertInfo
.
cbSize
=
sizeof
(
SCROLLINFO
);
vertInfo
.
nPage
=
infoPtr
->
rcList
.
bottom
-
infoPtr
->
rcList
.
top
;
/* for now, we'll set info.nMax to the _count_, and adjust it later */
if
(
uView
==
LVS_LIST
)
{
...
...
@@ -1527,18 +1523,12 @@ static void LISTVIEW_UpdateScroll(LISTVIEW_INFO *infoPtr)
else
if
(
uView
==
LVS_REPORT
)
{
horzInfo
.
nMax
=
infoPtr
->
nItemWidth
;
vertInfo
.
nMax
=
infoPtr
->
nItemCount
;
vertInfo
.
nPage
/=
infoPtr
->
nItemHeight
;
}
else
/* LVS_ICON, or LVS_SMALLICON */
{
RECT
rcView
;
if
(
LISTVIEW_GetViewRect
(
infoPtr
,
&
rcView
))
{
horzInfo
.
nMax
=
rcView
.
right
-
rcView
.
left
;
vertInfo
.
nMax
=
rcView
.
bottom
-
rcView
.
top
;
}
if
(
LISTVIEW_GetViewRect
(
infoPtr
,
&
rcView
))
horzInfo
.
nMax
=
rcView
.
right
-
rcView
.
left
;
}
horzInfo
.
fMask
=
SIF_RANGE
|
SIF_PAGE
;
...
...
@@ -1546,6 +1536,27 @@ static void LISTVIEW_UpdateScroll(LISTVIEW_INFO *infoPtr)
SetScrollInfo
(
infoPtr
->
hwndSelf
,
SB_HORZ
,
&
horzInfo
,
TRUE
);
TRACE
(
"horzInfo=%s
\n
"
,
debugscrollinfo
(
&
horzInfo
));
/* Setting the horizontal scroll can change the listview size
* (and potentially everything else) so we need to recompute
* everything again for the vertical scroll
*/
ZeroMemory
(
&
vertInfo
,
sizeof
(
SCROLLINFO
));
vertInfo
.
cbSize
=
sizeof
(
SCROLLINFO
);
vertInfo
.
nPage
=
infoPtr
->
rcList
.
bottom
-
infoPtr
->
rcList
.
top
;
if
(
uView
==
LVS_REPORT
)
{
vertInfo
.
nMax
=
infoPtr
->
nItemCount
;
vertInfo
.
nPage
/=
infoPtr
->
nItemHeight
;
}
else
if
(
uView
!=
LVS_LIST
)
/* LVS_ICON, or LVS_SMALLICON */
{
RECT
rcView
;
if
(
LISTVIEW_GetViewRect
(
infoPtr
,
&
rcView
))
vertInfo
.
nMax
=
rcView
.
bottom
-
rcView
.
top
;
}
vertInfo
.
fMask
=
SIF_RANGE
|
SIF_PAGE
;
vertInfo
.
nMax
=
max
(
vertInfo
.
nMax
-
1
,
0
);
SetScrollInfo
(
infoPtr
->
hwndSelf
,
SB_VERT
,
&
vertInfo
,
TRUE
);
...
...
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