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
e5786e3b
Commit
e5786e3b
authored
Jan 09, 2001
by
Ulrich Czekalla
Committed by
Alexandre Julliard
Jan 09, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust item rects by horizontal scrollbar offset.
parent
ea241dcd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
7 deletions
+21
-7
listview.c
dlls/comctl32/listview.c
+21
-7
No files found.
dlls/comctl32/listview.c
View file @
e5786e3b
...
...
@@ -3223,6 +3223,7 @@ static VOID LISTVIEW_RefreshReport(HWND hwnd, HDC hdc, DWORD cdmode)
BOOL
FullSelected
;
DWORD
cditemmode
=
CDRF_DODEFAULT
;
LONG
lStyle
=
GetWindowLongA
(
hwnd
,
GWL_STYLE
);
INT
scrollOffset
;
ZeroMemory
(
&
scrollInfo
,
sizeof
(
SCROLLINFO
));
scrollInfo
.
cbSize
=
sizeof
(
SCROLLINFO
);
...
...
@@ -3261,6 +3262,10 @@ static VOID LISTVIEW_RefreshReport(HWND hwnd, HDC hdc, DWORD cdmode)
if
(
GETITEMCOUNT
(
infoPtr
)
==
0
)
return
;
/* Get scroll bar info once before loop */
GetScrollInfo
(
hwnd
,
SB_HORZ
,
&
scrollInfo
);
scrollOffset
=
scrollInfo
.
nPos
*
LISTVIEW_SCROLL_DIV_SIZE
;
for
(;
nItem
<
nLast
;
nItem
++
)
{
RECT
SuggestedFocusRect
;
...
...
@@ -3288,8 +3293,8 @@ static VOID LISTVIEW_RefreshReport(HWND hwnd, HDC hdc, DWORD cdmode)
Header_GetItemRect
(
infoPtr
->
hwndHeader
,
nColumnCount
-
1
,
&
br
);
dis
.
rcItem
.
left
=
0
;
dis
.
rcItem
.
right
=
max
(
dis
.
rcItem
.
left
,
br
.
right
);
dis
.
rcItem
.
left
=
-
scrollOffset
;
dis
.
rcItem
.
right
=
max
(
dis
.
rcItem
.
left
,
br
.
right
-
scrollOffset
);
dis
.
rcItem
.
top
=
nDrawPosY
;
dis
.
rcItem
.
bottom
=
dis
.
rcItem
.
top
+
infoPtr
->
nItemHeight
;
...
...
@@ -3338,11 +3343,8 @@ static VOID LISTVIEW_RefreshReport(HWND hwnd, HDC hdc, DWORD cdmode)
rcItem
.
bottom
=
rcItem
.
top
+
infoPtr
->
nItemHeight
;
/* Offset the Scroll Bar Pos */
if
(
GetScrollInfo
(
hwnd
,
SB_HORZ
,
&
scrollInfo
)
!=
FALSE
)
{
rcItem
.
left
-=
(
scrollInfo
.
nPos
*
LISTVIEW_SCROLL_DIV_SIZE
);
rcItem
.
right
-=
(
scrollInfo
.
nPos
*
LISTVIEW_SCROLL_DIV_SIZE
);
}
rcItem
.
left
-=
scrollOffset
;
rcItem
.
right
-=
scrollOffset
;
if
(
j
==
0
)
{
...
...
@@ -5357,6 +5359,8 @@ static LRESULT LISTVIEW_GetItemRect(HWND hwnd, INT nItem, LPRECT lprc)
INT
nIndent
;
TEXTMETRICA
tm
;
LVITEMA
lvItem
;
INT
scrollOffset
;
SCROLLINFO
scrollInfo
;
TRACE
(
"(hwnd=%x, nItem=%d, lprc=%p)
\n
"
,
hwnd
,
nItem
,
lprc
);
...
...
@@ -5725,6 +5729,16 @@ static LRESULT LISTVIEW_GetItemRect(HWND hwnd, INT nItem, LPRECT lprc)
}
break
;
}
/* Adjust rectangle by scrollbar offset*/
ZeroMemory
(
&
scrollInfo
,
sizeof
(
SCROLLINFO
));
scrollInfo
.
cbSize
=
sizeof
(
SCROLLINFO
);
scrollInfo
.
fMask
=
SIF_POS
;
GetScrollInfo
(
hwnd
,
SB_HORZ
,
&
scrollInfo
);
scrollOffset
=
scrollInfo
.
nPos
*
LISTVIEW_SCROLL_DIV_SIZE
;
lprc
->
left
-=
scrollOffset
;
lprc
->
right
-=
scrollOffset
;
}
}
return
bResult
;
...
...
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