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
4a5e23a2
Commit
4a5e23a2
authored
May 10, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 11, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Select all items with LVM_SETITEMSTATE is blocked in LVS_SINGLESEL.
parent
472b5216
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
listview.c
dlls/comctl32/listview.c
+4
-0
listview.c
dlls/comctl32/tests/listview.c
+31
-0
No files found.
dlls/comctl32/listview.c
View file @
4a5e23a2
...
...
@@ -7687,6 +7687,10 @@ static BOOL LISTVIEW_SetItemState(LISTVIEW_INFO *infoPtr, INT nItem, const LVITE
if
(
nItem
==
-
1
)
{
/* select all isn't allowed in LVS_SINGLESEL */
if
((
lvItem
.
state
&
lvItem
.
stateMask
&
LVIS_SELECTED
)
&&
(
infoPtr
->
dwStyle
&
LVS_SINGLESEL
))
return
FALSE
;
/* apply to all items */
for
(
lvItem
.
iItem
=
0
;
lvItem
.
iItem
<
infoPtr
->
nItemCount
;
lvItem
.
iItem
++
)
if
(
!
LISTVIEW_SetItemT
(
infoPtr
,
&
lvItem
,
TRUE
))
bResult
=
FALSE
;
...
...
dlls/comctl32/tests/listview.c
View file @
4a5e23a2
...
...
@@ -1496,6 +1496,7 @@ static void test_multiselect(void)
BYTE
kstate
[
256
];
select_task
task
;
LONG_PTR
style
;
LVITEMA
item
;
static
struct
t_select_task
task_list
[]
=
{
{
"using VK_DOWN"
,
0
,
VK_DOWN
,
-
1
,
-
1
},
...
...
@@ -1605,6 +1606,36 @@ todo_wine
todo_wine
expect
(
-
1
,
r
);
/* try to select all on LVS_SINGLESEL */
memset
(
&
item
,
0
,
sizeof
(
item
));
item
.
stateMask
=
LVIS_SELECTED
;
r
=
SendMessage
(
hwnd
,
LVM_SETITEMSTATE
,
-
1
,
(
LPARAM
)
&
item
);
expect
(
TRUE
,
r
);
ListView_SetSelectionMark
(
hwnd
,
-
1
);
item
.
stateMask
=
LVIS_SELECTED
;
item
.
state
=
LVIS_SELECTED
;
r
=
SendMessage
(
hwnd
,
LVM_SETITEMSTATE
,
-
1
,
(
LPARAM
)
&
item
);
expect
(
FALSE
,
r
);
r
=
ListView_GetSelectedCount
(
hwnd
);
expect
(
0
,
r
);
r
=
ListView_GetSelectionMark
(
hwnd
);
expect
(
-
1
,
r
);
/* try to deselect all on LVS_SINGLESEL */
item
.
stateMask
=
LVIS_SELECTED
;
item
.
state
=
LVIS_SELECTED
;
r
=
SendMessage
(
hwnd
,
LVM_SETITEMSTATE
,
0
,
(
LPARAM
)
&
item
);
expect
(
TRUE
,
r
);
item
.
stateMask
=
LVIS_SELECTED
;
item
.
state
=
0
;
r
=
SendMessage
(
hwnd
,
LVM_SETITEMSTATE
,
-
1
,
(
LPARAM
)
&
item
);
expect
(
TRUE
,
r
);
r
=
ListView_GetSelectedCount
(
hwnd
);
expect
(
0
,
r
);
DestroyWindow
(
hwnd
);
}
...
...
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