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
6b6d18d7
Commit
6b6d18d7
authored
Apr 02, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Additional tests for ListView header creation.
parent
7e8e9c41
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
listview.c
dlls/comctl32/tests/listview.c
+16
-4
No files found.
dlls/comctl32/tests/listview.c
View file @
6b6d18d7
...
...
@@ -820,11 +820,11 @@ static void test_create(void)
hList
=
CreateWindow
(
"SysListView32"
,
"Test"
,
WS_VISIBLE
,
0
,
0
,
100
,
100
,
NULL
,
NULL
,
GetModuleHandle
(
NULL
),
0
);
ret
=
SetWindowLongPtr
(
hList
,
GWL_STYLE
,
GetWindowLongPtr
(
hList
,
GWL_STYLE
)
|
LVS_REPORT
);
ok
(
ret
=
WS_VISIBLE
,
"Style wrong, should be WS_VISIBLE|LVS_ICON
\n
"
);
ok
(
ret
&
WS_VISIBLE
,
"Style wrong, should have WS_VISIBLE
\n
"
);
hHeader
=
(
HWND
)
SendMessage
(
hList
,
LVM_GETHEADER
,
0
,
0
);
ok
(
IsWindow
(
hHeader
),
"Header should be created
\n
"
);
ret
=
SetWindowLongPtr
(
hList
,
GWL_STYLE
,
GetWindowLong
(
hList
,
GWL_STYLE
)
&
~
LVS_REPORT
);
ok
(
ret
=
WS_VISIBLE
|
LVS_REPORT
,
"Style wrong, should b
e WS_VISIBLE|LVS_REPORT
\n
"
);
ok
(
(
ret
&
WS_VISIBLE
)
&&
(
ret
&
LVS_REPORT
),
"Style wrong, should hav
e WS_VISIBLE|LVS_REPORT
\n
"
);
hHeader
=
(
HWND
)
SendMessage
(
hList
,
LVM_GETHEADER
,
0
,
0
);
ok
(
IsWindow
(
hHeader
),
"Header should be created
\n
"
);
ok
(
hHeader
==
GetDlgItem
(
hList
,
0
),
"Expected header as dialog item
\n
"
);
...
...
@@ -835,13 +835,13 @@ static void test_create(void)
GetModuleHandle
(
NULL
),
0
);
ret
=
SetWindowLongPtr
(
hList
,
GWL_STYLE
,
(
GetWindowLongPtr
(
hList
,
GWL_STYLE
)
&
~
LVS_LIST
)
|
LVS_REPORT
);
ok
(
ret
=
WS_VISIBLE
|
LVS_LIST
,
"Style wrong, should be WS_VISIBLE|LVS_ICON
\n
"
);
ok
(
((
ret
&
WS_VISIBLE
)
&&
(
ret
&
LVS_LIST
)),
"Style wrong, should have WS_VISIBLE|LVS_LIST
\n
"
);
hHeader
=
(
HWND
)
SendMessage
(
hList
,
LVM_GETHEADER
,
0
,
0
);
ok
(
IsWindow
(
hHeader
),
"Header shouldn't be created
\n
"
);
ok
(
hHeader
==
GetDlgItem
(
hList
,
0
),
"NULL dialog item expected
\n
"
);
ret
=
SetWindowLongPtr
(
hList
,
GWL_STYLE
,
(
GetWindowLongPtr
(
hList
,
GWL_STYLE
)
&
~
LVS_REPORT
)
|
LVS_LIST
);
ok
(
ret
=
WS_VISIBLE
|
LVS_REPORT
,
"Style wrong, should b
e WS_VISIBLE|LVS_REPORT
\n
"
);
ok
(
((
ret
&
WS_VISIBLE
)
&&
(
ret
&
LVS_REPORT
)),
"Style wrong, should hav
e WS_VISIBLE|LVS_REPORT
\n
"
);
hHeader
=
(
HWND
)
SendMessage
(
hList
,
LVM_GETHEADER
,
0
,
0
);
ok
(
IsWindow
(
hHeader
),
"Header shouldn't be created
\n
"
);
ok
(
hHeader
==
GetDlgItem
(
hList
,
0
),
"NULL dialog item expected
\n
"
);
...
...
@@ -863,6 +863,18 @@ static void test_create(void)
ok
(
IsWindow
(
hHeader
),
"Header should be created
\n
"
);
ok
(
hHeader
==
GetDlgItem
(
hList
,
0
),
"Expected header as dialog item
\n
"
);
DestroyWindow
(
hList
);
/* LVS_REPORT without WS_VISIBLE, try to show it */
hList
=
CreateWindow
(
"SysListView32"
,
"Test"
,
LVS_REPORT
,
0
,
0
,
100
,
100
,
NULL
,
NULL
,
GetModuleHandle
(
NULL
),
0
);
hHeader
=
(
HWND
)
SendMessage
(
hList
,
LVM_GETHEADER
,
0
,
0
);
todo_wine
ok
(
!
IsWindow
(
hHeader
),
"Header shouldn't be created
\n
"
);
todo_wine
ok
(
NULL
==
GetDlgItem
(
hList
,
0
),
"NULL dialog item expected
\n
"
);
ShowWindow
(
hList
,
SW_SHOW
);
hHeader
=
(
HWND
)
SendMessage
(
hList
,
LVM_GETHEADER
,
0
,
0
);
ok
(
IsWindow
(
hHeader
),
"Header shouldn't be created
\n
"
);
ok
(
hHeader
==
GetDlgItem
(
hList
,
0
),
"NULL dialog item expected
\n
"
);
DestroyWindow
(
hList
);
}
static
void
test_redraw
(
void
)
...
...
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