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
c5c5bcca
Commit
c5c5bcca
authored
May 26, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 27, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Some LVM_GETITEMRECT tests.
parent
fa7f46e8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
90 additions
and
0 deletions
+90
-0
listview.c
dlls/comctl32/tests/listview.c
+90
-0
No files found.
dlls/comctl32/tests/listview.c
View file @
c5c5bcca
...
...
@@ -2564,6 +2564,95 @@ static void test_columnscreation(void)
DestroyWindow
(
hwnd
);
}
static
void
test_getitemrect
(
void
)
{
HWND
hwnd
;
RECT
rect
;
DWORD
r
;
LVITEMA
item
;
LVCOLUMNA
col
;
INT
order
[
2
];
POINT
pt
;
hwnd
=
create_listview_control
(
0
);
ok
(
hwnd
!=
NULL
,
"failed to create a listview window
\n
"
);
/* empty item */
memset
(
&
item
,
0
,
sizeof
(
item
));
item
.
iItem
=
0
;
item
.
iSubItem
=
0
;
r
=
SendMessage
(
hwnd
,
LVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
item
);
expect
(
0
,
r
);
rect
.
left
=
LVIR_BOUNDS
;
rect
.
right
=
rect
.
top
=
rect
.
bottom
=
-
1
;
r
=
SendMessage
(
hwnd
,
LVM_GETITEMRECT
,
0
,
(
LPARAM
)
&
rect
);
expect
(
TRUE
,
r
);
/* zero width rectangle */
todo_wine
{
expect
(
0
,
rect
.
left
);
expect
(
0
,
rect
.
right
);
}
insert_column
(
hwnd
,
0
);
insert_column
(
hwnd
,
1
);
col
.
mask
=
LVCF_WIDTH
;
col
.
cx
=
50
;
r
=
SendMessage
(
hwnd
,
LVM_SETCOLUMN
,
0
,
(
LPARAM
)
&
col
);
expect
(
TRUE
,
r
);
col
.
mask
=
LVCF_WIDTH
;
col
.
cx
=
100
;
r
=
SendMessage
(
hwnd
,
LVM_SETCOLUMN
,
1
,
(
LPARAM
)
&
col
);
expect
(
TRUE
,
r
);
rect
.
left
=
LVIR_BOUNDS
;
rect
.
right
=
rect
.
top
=
rect
.
bottom
=
-
1
;
r
=
SendMessage
(
hwnd
,
LVM_GETITEMRECT
,
0
,
(
LPARAM
)
&
rect
);
expect
(
TRUE
,
r
);
/* still no left padding */
todo_wine
{
expect
(
0
,
rect
.
left
);
}
rect
.
left
=
LVIR_SELECTBOUNDS
;
rect
.
right
=
rect
.
top
=
rect
.
bottom
=
-
1
;
r
=
SendMessage
(
hwnd
,
LVM_GETITEMRECT
,
0
,
(
LPARAM
)
&
rect
);
expect
(
TRUE
,
r
);
/* padding */
todo_wine
expect
(
2
,
rect
.
left
);
/* change order */
order
[
0
]
=
1
;
order
[
1
]
=
0
;
r
=
SendMessage
(
hwnd
,
LVM_SETCOLUMNORDERARRAY
,
2
,
(
LPARAM
)
&
order
);
expect
(
TRUE
,
r
);
pt
.
x
=
-
1
;
r
=
SendMessage
(
hwnd
,
LVM_GETITEMPOSITION
,
0
,
(
LPARAM
)
&
pt
);
expect
(
TRUE
,
r
);
/* 1 indexed column width + padding */
todo_wine
expect
(
102
,
pt
.
x
);
/* rect is at zero too */
rect
.
left
=
LVIR_BOUNDS
;
rect
.
right
=
rect
.
top
=
rect
.
bottom
=
-
1
;
r
=
SendMessage
(
hwnd
,
LVM_GETITEMRECT
,
0
,
(
LPARAM
)
&
rect
);
expect
(
TRUE
,
r
);
todo_wine
expect
(
0
,
rect
.
left
);
/* just width sum */
todo_wine
expect
(
150
,
rect
.
right
);
rect
.
left
=
LVIR_SELECTBOUNDS
;
rect
.
right
=
rect
.
top
=
rect
.
bottom
=
-
1
;
r
=
SendMessage
(
hwnd
,
LVM_GETITEMRECT
,
0
,
(
LPARAM
)
&
rect
);
expect
(
TRUE
,
r
);
/* column width + padding */
todo_wine
expect
(
102
,
rect
.
left
);
DestroyWindow
(
hwnd
);
}
START_TEST
(
listview
)
{
HMODULE
hComctl32
;
...
...
@@ -2601,6 +2690,7 @@ START_TEST(listview)
test_columns
();
test_getorigin
();
test_multiselect
();
test_getitemrect
();
test_subitem_rect
();
test_sorting
();
test_ownerdata
();
...
...
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