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
7fb21244
Commit
7fb21244
authored
Apr 26, 2008
by
Guy Albertelli
Committed by
Alexandre Julliard
Apr 28, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
listview: Correct return value from LVM_GETORIGIN including tests for this.
Tests to validate return value of the LVM_GETORIGIN message and fix our implementation.
parent
e85fa81f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
0 deletions
+51
-0
listview.c
dlls/comctl32/listview.c
+2
-0
listview.c
dlls/comctl32/tests/listview.c
+49
-0
No files found.
dlls/comctl32/listview.c
View file @
7fb21244
...
...
@@ -9632,6 +9632,8 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case
LVM_GETORIGIN
:
if
(
!
lParam
)
return
FALSE
;
if
((
infoPtr
->
dwStyle
&
LVS_TYPEMASK
)
==
LVS_REPORT
||
(
infoPtr
->
dwStyle
&
LVS_TYPEMASK
)
==
LVS_LIST
)
return
FALSE
;
LISTVIEW_GetOrigin
(
infoPtr
,
(
LPPOINT
)
lParam
);
return
TRUE
;
...
...
dlls/comctl32/tests/listview.c
View file @
7fb21244
...
...
@@ -1076,6 +1076,54 @@ static void test_item_position(void)
DestroyWindow
(
hwnd
);
}
static
void
test_getorigin
(
void
)
{
/* LVM_GETORIGIN */
HWND
hwnd
;
DWORD
r
;
POINT
position
;
position
.
x
=
position
.
y
=
0
;
hwnd
=
create_custom_listview_control
(
LVS_ICON
);
ok
(
hwnd
!=
NULL
,
"failed to create a listview window
\n
"
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
trace
(
"test get origin results
\n
"
);
r
=
SendMessage
(
hwnd
,
LVM_GETORIGIN
,
0
,
(
LPARAM
)
&
position
);
expect
(
TRUE
,
r
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
DestroyWindow
(
hwnd
);
hwnd
=
create_custom_listview_control
(
LVS_SMALLICON
);
ok
(
hwnd
!=
NULL
,
"failed to create a listview window
\n
"
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
trace
(
"test get origin results
\n
"
);
r
=
SendMessage
(
hwnd
,
LVM_GETORIGIN
,
0
,
(
LPARAM
)
&
position
);
expect
(
TRUE
,
r
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
DestroyWindow
(
hwnd
);
hwnd
=
create_custom_listview_control
(
LVS_LIST
);
ok
(
hwnd
!=
NULL
,
"failed to create a listview window
\n
"
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
trace
(
"test get origin results
\n
"
);
r
=
SendMessage
(
hwnd
,
LVM_GETORIGIN
,
0
,
(
LPARAM
)
&
position
);
expect
(
FALSE
,
r
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
DestroyWindow
(
hwnd
);
hwnd
=
create_custom_listview_control
(
LVS_REPORT
);
ok
(
hwnd
!=
NULL
,
"failed to create a listview window
\n
"
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
trace
(
"test get origin results
\n
"
);
r
=
SendMessage
(
hwnd
,
LVM_GETORIGIN
,
0
,
(
LPARAM
)
&
position
);
expect
(
FALSE
,
r
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
DestroyWindow
(
hwnd
);
}
START_TEST
(
listview
)
{
HMODULE
hComctl32
;
...
...
@@ -1111,4 +1159,5 @@ START_TEST(listview)
test_item_count
();
test_item_position
();
test_columns
();
test_getorigin
();
}
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