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
4bc8e87a
Commit
4bc8e87a
authored
May 06, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 07, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Add tests for LVS_NOSORTHEADER switchover.
parent
5123ffc3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
2 deletions
+42
-2
listview.c
dlls/comctl32/listview.c
+0
-2
listview.c
dlls/comctl32/tests/listview.c
+42
-0
No files found.
dlls/comctl32/listview.c
View file @
4bc8e87a
...
...
@@ -9631,8 +9631,6 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType,
wStyleType
,
lpss
->
styleOld
,
lpss
->
styleNew
);
if
(
wStyleType
!=
GWL_STYLE
)
return
0
;
/* FIXME: if LVS_NOSORTHEADER changed, update header */
infoPtr
->
dwStyle
=
lpss
->
styleNew
;
...
...
dlls/comctl32/tests/listview.c
View file @
4bc8e87a
...
...
@@ -2027,6 +2027,47 @@ static void test_norecompute(void)
DestroyWindow
(
hwnd
);
}
static
void
test_nosortheader
(
void
)
{
HWND
hwnd
,
header
;
LONG_PTR
style
;
hwnd
=
create_listview_control
(
0
);
ok
(
hwnd
!=
NULL
,
"failed to create a listview window
\n
"
);
header
=
(
HWND
)
SendMessageA
(
hwnd
,
LVM_GETHEADER
,
0
,
0
);
ok
(
IsWindow
(
header
),
"header expected
\n
"
);
style
=
GetWindowLongPtr
(
header
,
GWL_STYLE
);
ok
(
style
&
HDS_BUTTONS
,
"expected header to have HDS_BUTTONS
\n
"
);
style
=
GetWindowLongPtr
(
hwnd
,
GWL_STYLE
);
SetWindowLongPtr
(
hwnd
,
GWL_STYLE
,
style
|
LVS_NOSORTHEADER
);
/* HDS_BUTTONS retained */
style
=
GetWindowLongPtr
(
header
,
GWL_STYLE
);
ok
(
style
&
HDS_BUTTONS
,
"expected header to retain HDS_BUTTONS
\n
"
);
DestroyWindow
(
hwnd
);
/* create with LVS_NOSORTHEADER */
hwnd
=
create_listview_control
(
LVS_NOSORTHEADER
);
ok
(
hwnd
!=
NULL
,
"failed to create a listview window
\n
"
);
header
=
(
HWND
)
SendMessageA
(
hwnd
,
LVM_GETHEADER
,
0
,
0
);
ok
(
IsWindow
(
header
),
"header expected
\n
"
);
style
=
GetWindowLongPtr
(
header
,
GWL_STYLE
);
ok
(
!
(
style
&
HDS_BUTTONS
),
"expected header to have no HDS_BUTTONS
\n
"
);
style
=
GetWindowLongPtr
(
hwnd
,
GWL_STYLE
);
SetWindowLongPtr
(
hwnd
,
GWL_STYLE
,
style
&
~
LVS_NOSORTHEADER
);
/* not changed here */
style
=
GetWindowLongPtr
(
header
,
GWL_STYLE
);
ok
(
!
(
style
&
HDS_BUTTONS
),
"expected header to have no HDS_BUTTONS
\n
"
);
DestroyWindow
(
hwnd
);
}
START_TEST
(
listview
)
{
HMODULE
hComctl32
;
...
...
@@ -2068,4 +2109,5 @@ START_TEST(listview)
test_sorting
();
test_ownerdata
();
test_norecompute
();
test_nosortheader
();
}
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