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
fe92119f
Commit
fe92119f
authored
May 18, 2010
by
Andrew Eikum
Committed by
Alexandre Julliard
May 18, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Derive subitem rect from listview origin.
parent
4ad98744
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
2 deletions
+56
-2
listview.c
dlls/comctl32/listview.c
+2
-2
listview.c
dlls/comctl32/tests/listview.c
+54
-0
No files found.
dlls/comctl32/listview.c
View file @
fe92119f
...
...
@@ -6986,7 +6986,7 @@ static BOOL LISTVIEW_GetSubItemRect(const LISTVIEW_INFO *infoPtr, INT nItem, LPR
}
}
if
(
!
LISTVIEW_GetItemPosition
(
infoPtr
,
nItem
,
&
Position
))
return
FALSE
;
LISTVIEW_GetOrigin
(
infoPtr
,
&
Position
)
;
if
(
nColumn
<
0
||
nColumn
>=
DPA_GetPtrCount
(
infoPtr
->
hdpaColumns
))
return
FALSE
;
...
...
@@ -7011,7 +7011,7 @@ static BOOL LISTVIEW_GetSubItemRect(const LISTVIEW_INFO *infoPtr, INT nItem, LPR
return
FALSE
;
}
OffsetRect
(
lprc
,
Position
.
x
-
REPORT_MARGINX
,
Position
.
y
);
OffsetRect
(
lprc
,
Position
.
x
,
Position
.
y
);
return
TRUE
;
}
...
...
dlls/comctl32/tests/listview.c
View file @
fe92119f
...
...
@@ -2090,6 +2090,7 @@ static void test_subitem_rect(void)
DWORD
r
;
LVCOLUMN
col
;
RECT
rect
;
INT
arr
[
3
];
/* test LVM_GETSUBITEMRECT for header */
hwnd
=
create_listview_control
(
LVS_REPORT
);
...
...
@@ -2181,6 +2182,59 @@ todo_wine
DestroyWindow
(
hwnd
);
/* test subitem rects after re-arranging columns */
hwnd
=
create_listview_control
(
LVS_REPORT
);
ok
(
hwnd
!=
NULL
,
"failed to create a listview window
\n
"
);
memset
(
&
col
,
0
,
sizeof
(
LVCOLUMN
));
col
.
mask
=
LVCF_WIDTH
;
col
.
cx
=
100
;
r
=
-
1
;
r
=
SendMessage
(
hwnd
,
LVM_INSERTCOLUMN
,
0
,
(
LPARAM
)
&
col
);
expect
(
0
,
r
);
col
.
cx
=
200
;
r
=
-
1
;
r
=
SendMessage
(
hwnd
,
LVM_INSERTCOLUMN
,
1
,
(
LPARAM
)
&
col
);
expect
(
1
,
r
);
col
.
cx
=
300
;
r
=
-
1
;
r
=
SendMessage
(
hwnd
,
LVM_INSERTCOLUMN
,
2
,
(
LPARAM
)
&
col
);
expect
(
2
,
r
);
insert_item
(
hwnd
,
0
);
arr
[
0
]
=
1
;
arr
[
1
]
=
0
;
arr
[
2
]
=
2
;
r
=
SendMessage
(
hwnd
,
LVM_SETCOLUMNORDERARRAY
,
3
,
(
LPARAM
)
arr
);
expect
(
TRUE
,
r
);
rect
.
left
=
LVIR_BOUNDS
;
rect
.
top
=
0
;
rect
.
right
=
rect
.
bottom
=
-
1
;
r
=
SendMessage
(
hwnd
,
LVM_GETSUBITEMRECT
,
0
,
(
LPARAM
)
&
rect
);
ok
(
r
!=
0
,
"Expected not-null LRESULT
\n
"
);
expect
(
0
,
rect
.
left
);
expect
(
600
,
rect
.
right
);
rect
.
left
=
LVIR_BOUNDS
;
rect
.
top
=
1
;
rect
.
right
=
rect
.
bottom
=
-
1
;
r
=
SendMessage
(
hwnd
,
LVM_GETSUBITEMRECT
,
0
,
(
LPARAM
)
&
rect
);
ok
(
r
!=
0
,
"Expected not-null LRESULT
\n
"
);
expect
(
0
,
rect
.
left
);
expect
(
200
,
rect
.
right
);
rect
.
left
=
LVIR_BOUNDS
;
rect
.
top
=
2
;
rect
.
right
=
rect
.
bottom
=
-
1
;
r
=
SendMessage
(
hwnd
,
LVM_GETSUBITEMRECT
,
0
,
(
LPARAM
)
&
rect
);
ok
(
r
!=
0
,
"Expected not-null LRESULT
\n
"
);
expect
(
300
,
rect
.
left
);
expect
(
600
,
rect
.
right
);
DestroyWindow
(
hwnd
);
/* try it for non LVS_REPORT style */
hwnd
=
CreateWindow
(
"SysListView32"
,
"Test"
,
LVS_ICON
,
0
,
0
,
100
,
100
,
NULL
,
NULL
,
GetModuleHandle
(
NULL
),
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