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
2575c37b
Commit
2575c37b
authored
Jan 06, 2007
by
Duane Clark
Committed by
Alexandre Julliard
Jan 08, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: listview: Allow LVIF_STATE flag in subitems.
parent
dbedc885
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
2 deletions
+33
-2
listview.c
dlls/comctl32/listview.c
+6
-2
listview.c
dlls/comctl32/tests/listview.c
+27
-0
No files found.
dlls/comctl32/listview.c
View file @
2575c37b
...
...
@@ -3506,8 +3506,12 @@ static BOOL set_sub_item(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL i
if
(
lpLVItem
->
iSubItem
>=
DPA_GetPtrCount
(
infoPtr
->
hdpaColumns
))
return
FALSE
;
/* First do some sanity checks */
if
(
lpLVItem
->
mask
&
~
(
LVIF_TEXT
|
LVIF_IMAGE
))
return
FALSE
;
if
(
!
(
lpLVItem
->
mask
&
(
LVIF_TEXT
|
LVIF_IMAGE
)))
return
TRUE
;
/* The LVIF_STATE flag is valid for subitems, but does not appear to be
particularly useful. We currently do not actually do anything with
the flag on subitems.
*/
if
(
lpLVItem
->
mask
&
~
(
LVIF_TEXT
|
LVIF_IMAGE
|
LVIF_STATE
))
return
FALSE
;
if
(
!
(
lpLVItem
->
mask
&
(
LVIF_TEXT
|
LVIF_IMAGE
|
LVIF_STATE
)))
return
TRUE
;
/* get the subitem structure, and create it if not there */
hdpaSubItems
=
(
HDPA
)
DPA_GetPtr
(
infoPtr
->
hdpaItems
,
lpLVItem
->
iItem
);
...
...
dlls/comctl32/tests/listview.c
View file @
2575c37b
...
...
@@ -313,6 +313,33 @@ static void test_items(void)
ok
(
r
!=
0
,
"ret %d
\n
"
,
r
);
ok
(
item
.
lParam
==
lparamTest
,
"got lParam %lx, expected %lx
\n
"
,
item
.
lParam
,
lparamTest
);
/**** Some tests of state highlighting ****/
memset
(
&
item
,
0xaa
,
sizeof
(
item
));
item
.
mask
=
LVIF_STATE
;
item
.
iItem
=
0
;
item
.
iSubItem
=
0
;
item
.
state
=
LVIS_SELECTED
;
item
.
stateMask
=
LVIS_SELECTED
|
LVIS_DROPHILITED
;
r
=
SendMessage
(
hwnd
,
LVM_SETITEM
,
0
,
(
LPARAM
)
&
item
);
ok
(
r
!=
0
,
"ret %d
\n
"
,
r
);
item
.
iSubItem
=
1
;
item
.
state
=
LVIS_DROPHILITED
;
r
=
SendMessage
(
hwnd
,
LVM_SETITEM
,
0
,
(
LPARAM
)
&
item
);
ok
(
r
!=
0
,
"ret %d
\n
"
,
r
);
memset
(
&
item
,
0xaa
,
sizeof
(
item
));
item
.
mask
=
LVIF_STATE
;
item
.
iItem
=
0
;
item
.
iSubItem
=
0
;
item
.
stateMask
=
-
1
;
r
=
SendMessage
(
hwnd
,
LVM_GETITEM
,
0
,
(
LPARAM
)
&
item
);
ok
(
r
!=
0
,
"ret %d
\n
"
,
r
);
ok
(
item
.
state
==
LVIS_SELECTED
,
"got state %x, expected %x
\n
"
,
item
.
state
,
LVIS_SELECTED
);
item
.
iSubItem
=
1
;
r
=
SendMessage
(
hwnd
,
LVM_GETITEM
,
0
,
(
LPARAM
)
&
item
);
ok
(
r
!=
0
,
"ret %d
\n
"
,
r
);
todo_wine
ok
(
item
.
state
==
LVIS_DROPHILITED
,
"got state %x, expected %x
\n
"
,
item
.
state
,
LVIS_DROPHILITED
);
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