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
b65423c5
Commit
b65423c5
authored
Sep 26, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 27, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/treeview: Erase background when painting over supplied hdc.
parent
63dbf6ee
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
treeview.c
dlls/comctl32/tests/treeview.c
+34
-0
treeview.c
dlls/comctl32/treeview.c
+1
-0
No files found.
dlls/comctl32/tests/treeview.c
View file @
b65423c5
...
...
@@ -1265,6 +1265,39 @@ static void test_TVS_SINGLEEXPAND(void)
DestroyWindow
(
hTree
);
}
static
void
test_WM_PAINT
(
void
)
{
HWND
hTree
;
COLORREF
clr
;
LONG
ret
;
RECT
rc
;
HDC
hdc
;
hTree
=
create_treeview_control
();
clr
=
SendMessageA
(
hTree
,
TVM_SETBKCOLOR
,
0
,
RGB
(
255
,
0
,
0
));
ok
(
clr
==
-
1
,
"got %d, expected -1
\n
"
,
clr
);
hdc
=
GetDC
(
hMainWnd
);
GetClientRect
(
hMainWnd
,
&
rc
);
FillRect
(
hdc
,
&
rc
,
GetStockObject
(
BLACK_BRUSH
));
clr
=
GetPixel
(
hdc
,
1
,
1
);
ok
(
clr
==
RGB
(
0
,
0
,
0
),
"got 0x%x
\n
"
,
clr
);
ret
=
SendMessageA
(
hTree
,
WM_PAINT
,
(
WPARAM
)
hdc
,
0
);
ok
(
ret
==
0
,
"got %d
\n
"
,
ret
);
clr
=
GetPixel
(
hdc
,
1
,
1
);
ok
(
clr
==
RGB
(
255
,
0
,
0
)
||
broken
(
clr
==
RGB
(
0
,
0
,
0
))
/* win98 */
,
"got 0x%x
\n
"
,
clr
);
ReleaseDC
(
hMainWnd
,
hdc
);
DestroyWindow
(
hTree
);
}
START_TEST
(
treeview
)
{
HMODULE
hComctl32
;
...
...
@@ -1330,6 +1363,7 @@ START_TEST(treeview)
test_treeview_classinfo
();
test_expandnotify
();
test_TVS_SINGLEEXPAND
();
test_WM_PAINT
();
if
(
!
load_v6_module
(
&
ctx_cookie
,
&
hCtx
))
{
...
...
dlls/comctl32/treeview.c
View file @
b65423c5
...
...
@@ -2921,6 +2921,7 @@ TREEVIEW_Paint(TREEVIEW_INFO *infoPtr, HDC hdc_ref)
{
hdc
=
hdc_ref
;
GetClientRect
(
infoPtr
->
hwnd
,
&
rc
);
TREEVIEW_FillBkgnd
(
infoPtr
,
hdc
,
&
rc
);
}
else
{
...
...
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