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
7b1ff882
Commit
7b1ff882
authored
Oct 31, 2013
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 31, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Initialize treeview checkboxes in WM_PAINT when TVS_CHECKBOXES was…
comctl32: Initialize treeview checkboxes in WM_PAINT when TVS_CHECKBOXES was passed during control creation.
parent
40648ddf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
4 deletions
+35
-4
treeview.c
dlls/comctl32/tests/treeview.c
+35
-1
treeview.c
dlls/comctl32/treeview.c
+0
-3
No files found.
dlls/comctl32/tests/treeview.c
View file @
7b1ff882
...
...
@@ -1771,6 +1771,7 @@ static void test_TVS_CHECKBOXES(void)
HWND
hTree
,
hTree2
;
TVITEMA
item
;
DWORD
ret
;
MSG
msg
;
hTree
=
create_treeview_control
(
0
);
fill_tree
(
hTree
);
...
...
@@ -1850,7 +1851,7 @@ static void test_TVS_CHECKBOXES(void)
hTree
=
create_treeview_control
(
TVS_CHECKBOXES
);
fill_tree
(
hTree
);
himl
=
(
HIMAGELIST
)
SendMessageA
(
hTree
,
TVM_GETIMAGELIST
,
TVSIL_STATE
,
0
);
todo_wine
ok
(
himl
==
NULL
,
"got %p
\n
"
,
himl
);
ok
(
himl
==
NULL
,
"got %p
\n
"
,
himl
);
item
.
hItem
=
hRoot
;
item
.
mask
=
TVIF_STATE
;
...
...
@@ -1868,6 +1869,39 @@ static void test_TVS_CHECKBOXES(void)
expect
(
TRUE
,
ret
);
ok
(
item
.
state
==
INDEXTOSTATEIMAGEMASK
(
1
),
"got 0x%x
\n
"
,
item
.
state
);
item
.
hItem
=
hChild
;
item
.
mask
=
TVIF_STATE
;
item
.
state
=
INDEXTOSTATEIMAGEMASK
(
2
);
item
.
stateMask
=
TVIS_STATEIMAGEMASK
;
ret
=
SendMessageA
(
hTree
,
TVM_SETITEMA
,
0
,
(
LPARAM
)
&
item
);
expect
(
TRUE
,
ret
);
item
.
hItem
=
hChild
;
item
.
mask
=
TVIF_STATE
;
item
.
state
=
0
;
ret
=
SendMessageA
(
hTree
,
TVM_GETITEMA
,
0
,
(
LPARAM
)
&
item
);
expect
(
TRUE
,
ret
);
ok
(
item
.
state
==
INDEXTOSTATEIMAGEMASK
(
2
),
"got 0x%x
\n
"
,
item
.
state
);
while
(
GetMessageA
(
&
msg
,
0
,
0
,
0
))
{
TranslateMessage
(
&
msg
);
DispatchMessageA
(
&
msg
);
if
((
msg
.
hwnd
==
hTree
)
&&
(
msg
.
message
==
WM_PAINT
))
break
;
}
item
.
hItem
=
hChild
;
item
.
mask
=
TVIF_STATE
;
item
.
state
=
0
;
ret
=
SendMessageA
(
hTree
,
TVM_GETITEMA
,
0
,
(
LPARAM
)
&
item
);
expect
(
TRUE
,
ret
);
ok
(
item
.
state
==
INDEXTOSTATEIMAGEMASK
(
1
),
"got 0x%x
\n
"
,
item
.
state
);
himl
=
(
HIMAGELIST
)
SendMessageA
(
hTree
,
TVM_GETIMAGELIST
,
TVSIL_STATE
,
0
);
ok
(
himl
!=
NULL
,
"got %p
\n
"
,
himl
);
DestroyWindow
(
hTree
);
}
...
...
dlls/comctl32/treeview.c
View file @
7b1ff882
...
...
@@ -5137,9 +5137,6 @@ TREEVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs)
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
hwnd
,
0
,
0
,
0
);
if
(
infoPtr
->
dwStyle
&
TVS_CHECKBOXES
)
TREEVIEW_InitCheckboxes
(
infoPtr
);
/* Make sure actual scrollbar state is consistent with uInternalStatus */
ShowScrollBar
(
hwnd
,
SB_VERT
,
FALSE
);
ShowScrollBar
(
hwnd
,
SB_HORZ
,
FALSE
);
...
...
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