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
5e1f5ebf
Commit
5e1f5ebf
authored
Sep 05, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 08, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Implement LVS_EX_TRANSPARENTBKGND style.
parent
d66b02b7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
1 deletion
+65
-1
listview.c
dlls/comctl32/listview.c
+15
-1
listview.c
dlls/comctl32/tests/listview.c
+50
-0
No files found.
dlls/comctl32/listview.c
View file @
5e1f5ebf
...
...
@@ -7299,7 +7299,10 @@ static BOOL LISTVIEW_SetBkColor(LISTVIEW_INFO *infoPtr, COLORREF clrBk)
if
(
clrBk
==
CLR_NONE
)
infoPtr
->
hBkBrush
=
(
HBRUSH
)
GetClassLongPtrW
(
infoPtr
->
hwndSelf
,
GCLP_HBRBACKGROUND
);
else
{
infoPtr
->
hBkBrush
=
CreateSolidBrush
(
clrBk
);
infoPtr
->
dwLvExStyle
&=
~
LVS_EX_TRANSPARENTBKGND
;
}
LISTVIEW_InvalidateList
(
infoPtr
);
}
...
...
@@ -7785,6 +7788,11 @@ static DWORD LISTVIEW_SetExtendedListViewStyle(LISTVIEW_INFO *infoPtr, DWORD dwM
LISTVIEW_UpdateSize
(
infoPtr
);
}
if
((
infoPtr
->
dwLvExStyle
^
dwOldExStyle
)
&
LVS_EX_TRANSPARENTBKGND
)
{
if
(
infoPtr
->
dwLvExStyle
&
LVS_EX_TRANSPARENTBKGND
)
LISTVIEW_SetBkColor
(
infoPtr
,
CLR_NONE
);
}
LISTVIEW_InvalidateList
(
infoPtr
);
return
dwOldExStyle
;
...
...
@@ -8800,7 +8808,13 @@ static inline BOOL LISTVIEW_EraseBkgnd(const LISTVIEW_INFO *infoPtr, HDC hdc)
if
(
!
GetClipBox
(
hdc
,
&
rc
))
return
FALSE
;
if
(
infoPtr
->
clrBk
==
CLR_NONE
)
return
SendMessageW
(
infoPtr
->
hwndNotify
,
WM_ERASEBKGND
,
(
WPARAM
)
hdc
,
0
);
{
if
(
infoPtr
->
dwLvExStyle
&
LVS_EX_TRANSPARENTBKGND
)
return
SendMessageW
(
infoPtr
->
hwndNotify
,
WM_PRINTCLIENT
,
(
WPARAM
)
hdc
,
PRF_ERASEBKGND
);
else
return
SendMessageW
(
infoPtr
->
hwndNotify
,
WM_ERASEBKGND
,
(
WPARAM
)
hdc
,
0
);
}
/* for double buffered controls we need to do this during refresh */
if
(
infoPtr
->
dwLvExStyle
&
LVS_EX_DOUBLEBUFFER
)
return
FALSE
;
...
...
dlls/comctl32/tests/listview.c
View file @
5e1f5ebf
...
...
@@ -265,6 +265,11 @@ static const struct message setredraw_seq[] = {
{
0
}
};
static
const
struct
message
lvs_ex_transparentbkgnd_seq
[]
=
{
{
WM_PRINTCLIENT
,
sent
|
lparam
,
0
,
PRF_ERASEBKGND
},
{
0
}
};
struct
subclass_info
{
WNDPROC
oldproc
;
...
...
@@ -3950,6 +3955,50 @@ static void test_scrollnotify(void)
DestroyWindow
(
hwnd
);
}
static
void
test_LVS_EX_TRANSPARENTBKGND
(
void
)
{
HWND
hwnd
;
DWORD
ret
;
HDC
hdc
;
hwnd
=
create_listview_control
(
0
);
ret
=
SendMessage
(
hwnd
,
LVM_SETBKCOLOR
,
0
,
RGB
(
0
,
0
,
0
));
expect
(
TRUE
,
ret
);
SendMessage
(
hwnd
,
LVM_SETEXTENDEDLISTVIEWSTYLE
,
LVS_EX_TRANSPARENTBKGND
,
LVS_EX_TRANSPARENTBKGND
);
ret
=
SendMessage
(
hwnd
,
LVM_GETBKCOLOR
,
0
,
0
);
if
(
ret
!=
CLR_NONE
)
{
win_skip
(
"LVS_EX_TRANSPARENTBKGND unsupported
\n
"
);
DestroyWindow
(
hwnd
);
return
;
}
/* try to set some back color and check this style bit */
ret
=
SendMessage
(
hwnd
,
LVM_SETBKCOLOR
,
0
,
RGB
(
0
,
0
,
0
));
expect
(
TRUE
,
ret
);
ret
=
SendMessage
(
hwnd
,
LVM_GETEXTENDEDLISTVIEWSTYLE
,
0
,
0
);
ok
(
!
(
ret
&
LVS_EX_TRANSPARENTBKGND
),
"Expected LVS_EX_TRANSPARENTBKGND to unset
\n
"
);
/* now test what this style actually does */
SendMessage
(
hwnd
,
LVM_SETEXTENDEDLISTVIEWSTYLE
,
LVS_EX_TRANSPARENTBKGND
,
LVS_EX_TRANSPARENTBKGND
);
hdc
=
GetWindowDC
(
hwndparent
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
SendMessageA
(
hwnd
,
WM_ERASEBKGND
,
(
WPARAM
)
hdc
,
0
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
lvs_ex_transparentbkgnd_seq
,
"LVS_EX_TRANSPARENTBKGND parent"
,
FALSE
);
ReleaseDC
(
hwndparent
,
hdc
);
DestroyWindow
(
hwnd
);
}
START_TEST
(
listview
)
{
HMODULE
hComctl32
;
...
...
@@ -4032,6 +4081,7 @@ START_TEST(listview)
test_canceleditlabel
();
test_mapidindex
();
test_scrollnotify
();
test_LVS_EX_TRANSPARENTBKGND
();
unload_v6_module
(
ctx_cookie
);
...
...
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