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
dfbe6645
Commit
dfbe6645
authored
Dec 04, 2011
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 05, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Create header when LVS_EX_GRIDLINES style is set.
parent
6a6e1108
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
18 deletions
+35
-18
listview.c
dlls/comctl32/listview.c
+21
-18
listview.c
dlls/comctl32/tests/listview.c
+14
-0
No files found.
dlls/comctl32/listview.c
View file @
dfbe6645
...
...
@@ -8392,17 +8392,19 @@ static HIMAGELIST LISTVIEW_CreateCheckBoxIL(const LISTVIEW_INFO *infoPtr)
* SUCCESS : previous style
* FAILURE : 0
*/
static
DWORD
LISTVIEW_SetExtendedListViewStyle
(
LISTVIEW_INFO
*
infoPtr
,
DWORD
dwMask
,
DWORD
dwExS
tyle
)
static
DWORD
LISTVIEW_SetExtendedListViewStyle
(
LISTVIEW_INFO
*
infoPtr
,
DWORD
mask
,
DWORD
ex_s
tyle
)
{
DWORD
dwOldExStyle
=
infoPtr
->
dwLvExStyle
;
DWORD
old_ex_style
=
infoPtr
->
dwLvExStyle
;
TRACE
(
"mask=0x%08x, ex_style=0x%08x
\n
"
,
mask
,
ex_style
);
/* set new style */
if
(
dwM
ask
)
infoPtr
->
dwLvExStyle
=
(
dwOldExStyle
&
~
dwMask
)
|
(
dwExStyle
&
dwM
ask
);
if
(
m
ask
)
infoPtr
->
dwLvExStyle
=
(
old_ex_style
&
~
mask
)
|
(
ex_style
&
m
ask
);
else
infoPtr
->
dwLvExStyle
=
dwExS
tyle
;
infoPtr
->
dwLvExStyle
=
ex_s
tyle
;
if
((
infoPtr
->
dwLvExStyle
^
dwOldExS
tyle
)
&
LVS_EX_CHECKBOXES
)
if
((
infoPtr
->
dwLvExStyle
^
old_ex_s
tyle
)
&
LVS_EX_CHECKBOXES
)
{
HIMAGELIST
himl
=
0
;
if
(
infoPtr
->
dwLvExStyle
&
LVS_EX_CHECKBOXES
)
...
...
@@ -8422,38 +8424,39 @@ static DWORD LISTVIEW_SetExtendedListViewStyle(LISTVIEW_INFO *infoPtr, DWORD dwM
if
(((
infoPtr
->
dwLvExStyle
&
LVS_EX_CHECKBOXES
)
&&
!
(
infoPtr
->
dwStyle
&
LVS_SHAREIMAGELISTS
))
||
/* ...previous was checkbox list */
(
dwOldExS
tyle
&
LVS_EX_CHECKBOXES
))
(
old_ex_s
tyle
&
LVS_EX_CHECKBOXES
))
ImageList_Destroy
(
himl
);
}
if
((
infoPtr
->
dwLvExStyle
^
dwOldExS
tyle
)
&
LVS_EX_HEADERDRAGDROP
)
if
((
infoPtr
->
dwLvExStyle
^
old_ex_s
tyle
)
&
LVS_EX_HEADERDRAGDROP
)
{
DWORD
dwS
tyle
;
DWORD
s
tyle
;
/* if not already created */
LISTVIEW_CreateHeader
(
infoPtr
);
dwS
tyle
=
GetWindowLongW
(
infoPtr
->
hwndHeader
,
GWL_STYLE
);
s
tyle
=
GetWindowLongW
(
infoPtr
->
hwndHeader
,
GWL_STYLE
);
if
(
infoPtr
->
dwLvExStyle
&
LVS_EX_HEADERDRAGDROP
)
dwS
tyle
|=
HDS_DRAGDROP
;
s
tyle
|=
HDS_DRAGDROP
;
else
dwS
tyle
&=
~
HDS_DRAGDROP
;
SetWindowLongW
(
infoPtr
->
hwndHeader
,
GWL_STYLE
,
dwS
tyle
);
s
tyle
&=
~
HDS_DRAGDROP
;
SetWindowLongW
(
infoPtr
->
hwndHeader
,
GWL_STYLE
,
s
tyle
);
}
/* GRIDLINES adds decoration at top so changes sizes */
if
((
infoPtr
->
dwLvExStyle
^
dwOldExS
tyle
)
&
LVS_EX_GRIDLINES
)
if
((
infoPtr
->
dwLvExStyle
^
old_ex_s
tyle
)
&
LVS_EX_GRIDLINES
)
{
LISTVIEW_CreateHeader
(
infoPtr
);
LISTVIEW_UpdateSize
(
infoPtr
);
}
if
((
infoPtr
->
dwLvExStyle
^
dwOldExS
tyle
)
&
LVS_EX_TRANSPARENTBKGND
)
if
((
infoPtr
->
dwLvExStyle
^
old_ex_s
tyle
)
&
LVS_EX_TRANSPARENTBKGND
)
{
if
(
infoPtr
->
dwLvExStyle
&
LVS_EX_TRANSPARENTBKGND
)
LISTVIEW_SetBkColor
(
infoPtr
,
CLR_NONE
);
}
if
((
infoPtr
->
dwLvExStyle
^
dwOldExS
tyle
)
&
LVS_EX_HEADERINALLVIEWS
)
if
((
infoPtr
->
dwLvExStyle
^
old_ex_s
tyle
)
&
LVS_EX_HEADERINALLVIEWS
)
{
if
(
infoPtr
->
dwLvExStyle
&
LVS_EX_HEADERINALLVIEWS
)
LISTVIEW_CreateHeader
(
infoPtr
);
...
...
@@ -8464,7 +8467,7 @@ static DWORD LISTVIEW_SetExtendedListViewStyle(LISTVIEW_INFO *infoPtr, DWORD dwM
}
LISTVIEW_InvalidateList
(
infoPtr
);
return
dwOldExS
tyle
;
return
old_ex_s
tyle
;
}
/***
...
...
@@ -9369,7 +9372,7 @@ static LRESULT LISTVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs)
{
LISTVIEW_INFO
*
infoPtr
=
(
LISTVIEW_INFO
*
)
GetWindowLongPtrW
(
hwnd
,
0
);
TRACE
(
"(lpcs=%p
)
\n
"
,
lpcs
);
TRACE
(
"(lpcs=%p
, style=0x%08x)
\n
"
,
lpcs
,
lpcs
->
style
);
infoPtr
->
dwStyle
=
lpcs
->
style
;
map_style_view
(
infoPtr
);
...
...
dlls/comctl32/tests/listview.c
View file @
dfbe6645
...
...
@@ -1543,6 +1543,20 @@ static void test_create(void)
ok
(
hHeader
==
GetDlgItem
(
hList
,
0
),
"Expected header as dialog item
\n
"
);
DestroyWindow
(
hList
);
/* setting LVS_EX_GRIDLINES creates header */
hList
=
CreateWindow
(
"SysListView32"
,
"Test"
,
LVS_REPORT
,
0
,
0
,
100
,
100
,
NULL
,
NULL
,
GetModuleHandle
(
NULL
),
0
);
hHeader
=
(
HWND
)
SendMessage
(
hList
,
LVM_GETHEADER
,
0
,
0
);
ok
(
!
IsWindow
(
hHeader
),
"Header shouldn't be created
\n
"
);
ok
(
NULL
==
GetDlgItem
(
hList
,
0
),
"NULL dialog item expected
\n
"
);
SendMessage
(
hList
,
LVM_SETEXTENDEDLISTVIEWSTYLE
,
0
,
LVS_EX_GRIDLINES
);
hHeader
=
(
HWND
)
SendMessage
(
hList
,
LVM_GETHEADER
,
0
,
0
);
ok
(
IsWindow
(
hHeader
)
||
broken
(
!
IsWindow
(
hHeader
)),
/* 4.7x common controls */
"Header should be created
\n
"
);
ok
(
hHeader
==
GetDlgItem
(
hList
,
0
),
"Expected header as dialog item
\n
"
);
DestroyWindow
(
hList
);
/* not report style accepts LVS_EX_HEADERDRAGDROP too */
hList
=
create_listview_control
(
LVS_ICON
);
SendMessage
(
hList
,
LVM_SETEXTENDEDLISTVIEWSTYLE
,
0
,
LVS_EX_HEADERDRAGDROP
);
...
...
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