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
1fac98d3
Commit
1fac98d3
authored
May 03, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 04, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Test WM_ERASEBKGND forwarding to parent on CL_NONE background.
parent
59b08cc1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
8 deletions
+39
-8
listview.c
dlls/comctl32/tests/listview.c
+39
-8
No files found.
dlls/comctl32/tests/listview.c
View file @
1fac98d3
...
...
@@ -26,9 +26,10 @@
#include "wine/test.h"
#include "msg.h"
#define PARENT_SEQ_INDEX 0
#define LISTVIEW_SEQ_INDEX 1
#define NUM_MSG_SEQUENCES 2
#define PARENT_SEQ_INDEX 0
#define PARENT_FULL_SEQ_INDEX 1
#define LISTVIEW_SEQ_INDEX 2
#define NUM_MSG_SEQUENCES 3
#define LISTVIEW_ID 0
#define HEADER_ID 1
...
...
@@ -162,6 +163,11 @@ static const struct message empty_seq[] = {
{
0
}
};
static
const
struct
message
forward_erasebkgnd_parent_seq
[]
=
{
{
WM_ERASEBKGND
,
sent
},
{
0
}
};
struct
subclass_info
{
WNDPROC
oldproc
;
...
...
@@ -173,6 +179,12 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP
LRESULT
ret
;
struct
message
msg
;
msg
.
message
=
message
;
msg
.
flags
=
sent
|
wparam
|
lparam
;
if
(
defwndproc_counter
)
msg
.
flags
|=
defwinproc
;
msg
.
wParam
=
wParam
;
msg
.
lParam
=
lParam
;
/* log system messages, except for painting */
if
(
message
<
WM_USER
&&
message
!=
WM_PAINT
&&
...
...
@@ -185,13 +197,9 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP
{
trace
(
"parent: %p, %04x, %08lx, %08lx
\n
"
,
hwnd
,
message
,
wParam
,
lParam
);
msg
.
message
=
message
;
msg
.
flags
=
sent
|
wparam
|
lparam
;
if
(
defwndproc_counter
)
msg
.
flags
|=
defwinproc
;
msg
.
wParam
=
wParam
;
msg
.
lParam
=
lParam
;
add_message
(
sequences
,
PARENT_SEQ_INDEX
,
&
msg
);
}
add_message
(
sequences
,
PARENT_FULL_SEQ_INDEX
,
&
msg
);
defwndproc_counter
++
;
ret
=
DefWindowProcA
(
hwnd
,
message
,
wParam
,
lParam
);
...
...
@@ -1058,6 +1066,8 @@ static void test_create(void)
static
void
test_redraw
(
void
)
{
HWND
hwnd
,
hwndheader
;
HDC
hdc
;
BOOL
res
;
hwnd
=
create_listview_control
(
0
);
hwndheader
=
subclass_header
(
hwnd
);
...
...
@@ -1071,6 +1081,27 @@ static void test_redraw(void)
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
/* forward WM_ERASEBKGND to parent on CLR_NONE background color */
res
=
ListView_SetBkColor
(
hwnd
,
CLR_NONE
);
expect
(
TRUE
,
res
);
hdc
=
GetWindowDC
(
hwndparent
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
SendMessageA
(
hwnd
,
WM_ERASEBKGND
,
(
WPARAM
)
hdc
,
0
);
ok_sequence
(
sequences
,
PARENT_FULL_SEQ_INDEX
,
forward_erasebkgnd_parent_seq
,
"forward WM_ERASEBKGND on CLR_NONE"
,
TRUE
);
res
=
ListView_SetBkColor
(
hwnd
,
CLR_DEFAULT
);
expect
(
TRUE
,
res
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
SendMessageA
(
hwnd
,
WM_ERASEBKGND
,
(
WPARAM
)
hdc
,
0
);
ok_sequence
(
sequences
,
PARENT_FULL_SEQ_INDEX
,
empty_seq
,
"don't forward WM_ERASEBKGND on non-CLR_NONE"
,
FALSE
);
ReleaseDC
(
hwndparent
,
hdc
);
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