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
2eb171c1
Commit
2eb171c1
authored
Jan 09, 2007
by
Felix Nawothnig
Committed by
Alexandre Julliard
Jan 09, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
treeview: Initialize iImage and iSelectedImage with zero.
parent
5a220321
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
treeview.c
dlls/comctl32/tests/treeview.c
+8
-0
treeview.c
dlls/comctl32/treeview.c
+6
-2
No files found.
dlls/comctl32/tests/treeview.c
View file @
2eb171c1
...
...
@@ -70,6 +70,7 @@ static void IdentifyItem(HTREEITEM hItem)
static
void
FillRoot
(
void
)
{
TVINSERTSTRUCTA
ins
;
TVITEM
tvi
;
static
CHAR
root
[]
=
"Root"
,
child
[]
=
"Child"
;
...
...
@@ -82,6 +83,13 @@ static void FillRoot(void)
hRoot
=
TreeView_InsertItem
(
hTree
,
&
ins
);
assert
(
hRoot
);
/* UMLPad 1.15 depends on this being not -1 (I_IMAGECALLBACK) */
tvi
.
hItem
=
hRoot
;
tvi
.
mask
=
TVIF_IMAGE
|
TVIF_SELECTEDIMAGE
;
SendMessage
(
hTree
,
TVM_GETITEM
,
0
,
(
LPARAM
)
&
tvi
);
ok
(
tvi
.
iImage
==
0
,
"tvi.iImage=%d
\n
"
,
tvi
.
iImage
);
ok
(
tvi
.
iSelectedImage
==
0
,
"tvi.iSelectedImage=%d
\n
"
,
tvi
.
iSelectedImage
);
AddItem
(
'B'
);
ins
.
hParent
=
hRoot
;
ins
.
hInsertAfter
=
TVI_FIRST
;
...
...
dlls/comctl32/treeview.c
View file @
2eb171c1
...
...
@@ -1010,8 +1010,12 @@ TREEVIEW_AllocateItem(TREEVIEW_INFO *infoPtr)
if
(
!
newItem
)
return
NULL
;
newItem
->
iImage
=
-
1
;
newItem
->
iSelectedImage
=
-
1
;
/* I_IMAGENONE would make more sense but this is neither what is
* documented (MSDN doesn't specify) nor what Windows actually does
* (it sets it to zero)... and I can so imagine an application using
* inc/dec to toggle the images. */
newItem
->
iImage
=
0
;
newItem
->
iSelectedImage
=
0
;
if
(
DPA_InsertPtr
(
infoPtr
->
items
,
INT_MAX
,
newItem
)
==
-
1
)
{
...
...
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