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
297a7349
Commit
297a7349
authored
Jul 19, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Use nameless unions/structs.
parent
573e20e9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
93 additions
and
93 deletions
+93
-93
propsheet.c
dlls/comctl32/tests/propsheet.c
+44
-44
treeview.c
dlls/comctl32/tests/treeview.c
+49
-49
No files found.
dlls/comctl32/tests/propsheet.c
View file @
297a7349
...
@@ -161,8 +161,8 @@ static void test_title(void)
...
@@ -161,8 +161,8 @@ static void test_title(void)
psp
.
dwFlags
=
PSP_USETITLE
;
psp
.
dwFlags
=
PSP_USETITLE
;
psp
.
hInstance
=
GetModuleHandleA
(
NULL
);
psp
.
hInstance
=
GetModuleHandleA
(
NULL
);
psp
.
pszTitle
=
"page title"
;
psp
.
pszTitle
=
"page title"
;
U
(
psp
)
.
pszTemplate
=
"prop_page1"
;
psp
.
pszTemplate
=
"prop_page1"
;
U2
(
psp
)
.
pszIcon
=
NULL
;
psp
.
pszIcon
=
NULL
;
psp
.
pfnDlgProc
=
page_dlg_proc
;
psp
.
pfnDlgProc
=
page_dlg_proc
;
psp
.
lParam
=
0
;
psp
.
lParam
=
0
;
...
@@ -174,7 +174,7 @@ static void test_title(void)
...
@@ -174,7 +174,7 @@ static void test_title(void)
psh
.
pszCaption
=
"test caption"
;
psh
.
pszCaption
=
"test caption"
;
psh
.
nPages
=
1
;
psh
.
nPages
=
1
;
psh
.
hwndParent
=
GetDesktopWindow
();
psh
.
hwndParent
=
GetDesktopWindow
();
U3
(
psh
)
.
phpage
=
hpsp
;
psh
.
phpage
=
hpsp
;
psh
.
pfnCallback
=
sheet_callback
;
psh
.
pfnCallback
=
sheet_callback
;
hdlg
=
(
HWND
)
pPropertySheetA
(
&
psh
);
hdlg
=
(
HWND
)
pPropertySheetA
(
&
psh
);
...
@@ -200,8 +200,8 @@ static void test_nopage(void)
...
@@ -200,8 +200,8 @@ static void test_nopage(void)
psp
.
dwSize
=
sizeof
(
psp
);
psp
.
dwSize
=
sizeof
(
psp
);
psp
.
dwFlags
=
0
;
psp
.
dwFlags
=
0
;
psp
.
hInstance
=
GetModuleHandleA
(
NULL
);
psp
.
hInstance
=
GetModuleHandleA
(
NULL
);
U
(
psp
)
.
pszTemplate
=
"prop_page1"
;
psp
.
pszTemplate
=
"prop_page1"
;
U2
(
psp
)
.
pszIcon
=
NULL
;
psp
.
pszIcon
=
NULL
;
psp
.
pfnDlgProc
=
page_dlg_proc
;
psp
.
pfnDlgProc
=
page_dlg_proc
;
psp
.
lParam
=
0
;
psp
.
lParam
=
0
;
...
@@ -213,7 +213,7 @@ static void test_nopage(void)
...
@@ -213,7 +213,7 @@ static void test_nopage(void)
psh
.
pszCaption
=
"test caption"
;
psh
.
pszCaption
=
"test caption"
;
psh
.
nPages
=
1
;
psh
.
nPages
=
1
;
psh
.
hwndParent
=
GetDesktopWindow
();
psh
.
hwndParent
=
GetDesktopWindow
();
U3
(
psh
)
.
phpage
=
hpsp
;
psh
.
phpage
=
hpsp
;
psh
.
pfnCallback
=
sheet_callback
;
psh
.
pfnCallback
=
sheet_callback
;
hdlg
=
(
HWND
)
pPropertySheetA
(
&
psh
);
hdlg
=
(
HWND
)
pPropertySheetA
(
&
psh
);
...
@@ -280,8 +280,8 @@ static void test_disableowner(void)
...
@@ -280,8 +280,8 @@ static void test_disableowner(void)
psp
.
dwSize
=
sizeof
(
psp
);
psp
.
dwSize
=
sizeof
(
psp
);
psp
.
dwFlags
=
0
;
psp
.
dwFlags
=
0
;
psp
.
hInstance
=
GetModuleHandleA
(
NULL
);
psp
.
hInstance
=
GetModuleHandleA
(
NULL
);
U
(
psp
)
.
pszTemplate
=
"prop_page1"
;
psp
.
pszTemplate
=
"prop_page1"
;
U2
(
psp
)
.
pszIcon
=
NULL
;
psp
.
pszIcon
=
NULL
;
psp
.
pfnDlgProc
=
NULL
;
psp
.
pfnDlgProc
=
NULL
;
psp
.
lParam
=
0
;
psp
.
lParam
=
0
;
...
@@ -293,7 +293,7 @@ static void test_disableowner(void)
...
@@ -293,7 +293,7 @@ static void test_disableowner(void)
psh
.
pszCaption
=
"test caption"
;
psh
.
pszCaption
=
"test caption"
;
psh
.
nPages
=
1
;
psh
.
nPages
=
1
;
psh
.
hwndParent
=
parenthwnd
;
psh
.
hwndParent
=
parenthwnd
;
U3
(
psh
)
.
phpage
=
hpsp
;
psh
.
phpage
=
hpsp
;
psh
.
pfnCallback
=
disableowner_callback
;
psh
.
pfnCallback
=
disableowner_callback
;
p
=
pPropertySheetA
(
&
psh
);
p
=
pPropertySheetA
(
&
psh
);
...
@@ -379,25 +379,25 @@ static void test_wiznavigation(void)
...
@@ -379,25 +379,25 @@ static void test_wiznavigation(void)
psp
[
0
].
dwSize
=
sizeof
(
PROPSHEETPAGEA
);
psp
[
0
].
dwSize
=
sizeof
(
PROPSHEETPAGEA
);
psp
[
0
].
hInstance
=
GetModuleHandleA
(
NULL
);
psp
[
0
].
hInstance
=
GetModuleHandleA
(
NULL
);
U
(
psp
[
0
])
.
pszTemplate
=
(
LPCSTR
)
MAKEINTRESOURCE
(
IDD_PROP_PAGE_INTRO
);
psp
[
0
]
.
pszTemplate
=
(
LPCSTR
)
MAKEINTRESOURCE
(
IDD_PROP_PAGE_INTRO
);
psp
[
0
].
pfnDlgProc
=
nav_page_proc
;
psp
[
0
].
pfnDlgProc
=
nav_page_proc
;
hpsp
[
0
]
=
pCreatePropertySheetPageA
(
&
psp
[
0
]);
hpsp
[
0
]
=
pCreatePropertySheetPageA
(
&
psp
[
0
]);
psp
[
1
].
dwSize
=
sizeof
(
PROPSHEETPAGEA
);
psp
[
1
].
dwSize
=
sizeof
(
PROPSHEETPAGEA
);
psp
[
1
].
hInstance
=
GetModuleHandleA
(
NULL
);
psp
[
1
].
hInstance
=
GetModuleHandleA
(
NULL
);
U
(
psp
[
1
])
.
pszTemplate
=
(
LPCSTR
)
MAKEINTRESOURCE
(
IDD_PROP_PAGE_EDIT
);
psp
[
1
]
.
pszTemplate
=
(
LPCSTR
)
MAKEINTRESOURCE
(
IDD_PROP_PAGE_EDIT
);
psp
[
1
].
pfnDlgProc
=
nav_page_proc
;
psp
[
1
].
pfnDlgProc
=
nav_page_proc
;
hpsp
[
1
]
=
pCreatePropertySheetPageA
(
&
psp
[
1
]);
hpsp
[
1
]
=
pCreatePropertySheetPageA
(
&
psp
[
1
]);
psp
[
2
].
dwSize
=
sizeof
(
PROPSHEETPAGEA
);
psp
[
2
].
dwSize
=
sizeof
(
PROPSHEETPAGEA
);
psp
[
2
].
hInstance
=
GetModuleHandleA
(
NULL
);
psp
[
2
].
hInstance
=
GetModuleHandleA
(
NULL
);
U
(
psp
[
2
])
.
pszTemplate
=
(
LPCSTR
)
MAKEINTRESOURCE
(
IDD_PROP_PAGE_RADIO
);
psp
[
2
]
.
pszTemplate
=
(
LPCSTR
)
MAKEINTRESOURCE
(
IDD_PROP_PAGE_RADIO
);
psp
[
2
].
pfnDlgProc
=
nav_page_proc
;
psp
[
2
].
pfnDlgProc
=
nav_page_proc
;
hpsp
[
2
]
=
pCreatePropertySheetPageA
(
&
psp
[
2
]);
hpsp
[
2
]
=
pCreatePropertySheetPageA
(
&
psp
[
2
]);
psp
[
3
].
dwSize
=
sizeof
(
PROPSHEETPAGEA
);
psp
[
3
].
dwSize
=
sizeof
(
PROPSHEETPAGEA
);
psp
[
3
].
hInstance
=
GetModuleHandleA
(
NULL
);
psp
[
3
].
hInstance
=
GetModuleHandleA
(
NULL
);
U
(
psp
[
3
])
.
pszTemplate
=
(
LPCSTR
)
MAKEINTRESOURCE
(
IDD_PROP_PAGE_EXIT
);
psp
[
3
]
.
pszTemplate
=
(
LPCSTR
)
MAKEINTRESOURCE
(
IDD_PROP_PAGE_EXIT
);
psp
[
3
].
pfnDlgProc
=
nav_page_proc
;
psp
[
3
].
pfnDlgProc
=
nav_page_proc
;
hpsp
[
3
]
=
pCreatePropertySheetPageA
(
&
psp
[
3
]);
hpsp
[
3
]
=
pCreatePropertySheetPageA
(
&
psp
[
3
]);
...
@@ -408,7 +408,7 @@ static void test_wiznavigation(void)
...
@@ -408,7 +408,7 @@ static void test_wiznavigation(void)
psh
.
pszCaption
=
"A Wizard"
;
psh
.
pszCaption
=
"A Wizard"
;
psh
.
nPages
=
4
;
psh
.
nPages
=
4
;
psh
.
hwndParent
=
GetDesktopWindow
();
psh
.
hwndParent
=
GetDesktopWindow
();
U3
(
psh
)
.
phpage
=
hpsp
;
psh
.
phpage
=
hpsp
;
hdlg
=
(
HWND
)
pPropertySheetA
(
&
psh
);
hdlg
=
(
HWND
)
pPropertySheetA
(
&
psh
);
ok
(
hdlg
!=
INVALID_HANDLE_VALUE
,
"got invalid handle %p
\n
"
,
hdlg
);
ok
(
hdlg
!=
INVALID_HANDLE_VALUE
,
"got invalid handle %p
\n
"
,
hdlg
);
...
@@ -499,8 +499,8 @@ static void test_buttons(void)
...
@@ -499,8 +499,8 @@ static void test_buttons(void)
psp
.
dwSize
=
sizeof
(
psp
);
psp
.
dwSize
=
sizeof
(
psp
);
psp
.
dwFlags
=
0
;
psp
.
dwFlags
=
0
;
psp
.
hInstance
=
GetModuleHandleA
(
NULL
);
psp
.
hInstance
=
GetModuleHandleA
(
NULL
);
U
(
psp
)
.
pszTemplate
=
"prop_page1"
;
psp
.
pszTemplate
=
"prop_page1"
;
U2
(
psp
)
.
pszIcon
=
NULL
;
psp
.
pszIcon
=
NULL
;
psp
.
pfnDlgProc
=
page_dlg_proc
;
psp
.
pfnDlgProc
=
page_dlg_proc
;
psp
.
lParam
=
0
;
psp
.
lParam
=
0
;
...
@@ -512,7 +512,7 @@ static void test_buttons(void)
...
@@ -512,7 +512,7 @@ static void test_buttons(void)
psh
.
pszCaption
=
"test caption"
;
psh
.
pszCaption
=
"test caption"
;
psh
.
nPages
=
1
;
psh
.
nPages
=
1
;
psh
.
hwndParent
=
GetDesktopWindow
();
psh
.
hwndParent
=
GetDesktopWindow
();
U3
(
psh
)
.
phpage
=
hpsp
;
psh
.
phpage
=
hpsp
;
psh
.
pfnCallback
=
sheet_callback
;
psh
.
pfnCallback
=
sheet_callback
;
hdlg
=
(
HWND
)
pPropertySheetA
(
&
psh
);
hdlg
=
(
HWND
)
pPropertySheetA
(
&
psh
);
...
@@ -589,8 +589,8 @@ static void test_custom_default_button(void)
...
@@ -589,8 +589,8 @@ static void test_custom_default_button(void)
psp
[
0
].
dwSize
=
sizeof
(
PROPSHEETPAGEA
);
psp
[
0
].
dwSize
=
sizeof
(
PROPSHEETPAGEA
);
psp
[
0
].
dwFlags
=
PSP_USETITLE
;
psp
[
0
].
dwFlags
=
PSP_USETITLE
;
psp
[
0
].
hInstance
=
GetModuleHandleA
(
NULL
);
psp
[
0
].
hInstance
=
GetModuleHandleA
(
NULL
);
U
(
psp
[
0
])
.
pszTemplate
=
(
LPCSTR
)
MAKEINTRESOURCE
(
IDD_PROP_PAGE_WITH_CUSTOM_DEFAULT_BUTTON
);
psp
[
0
]
.
pszTemplate
=
(
LPCSTR
)
MAKEINTRESOURCE
(
IDD_PROP_PAGE_WITH_CUSTOM_DEFAULT_BUTTON
);
U2
(
psp
[
0
])
.
pszIcon
=
NULL
;
psp
[
0
]
.
pszIcon
=
NULL
;
psp
[
0
].
pfnDlgProc
=
page_with_custom_default_button_dlg_proc
;
psp
[
0
].
pfnDlgProc
=
page_with_custom_default_button_dlg_proc
;
psp
[
0
].
pszTitle
=
"Page1"
;
psp
[
0
].
pszTitle
=
"Page1"
;
psp
[
0
].
lParam
=
0
;
psp
[
0
].
lParam
=
0
;
...
@@ -599,11 +599,11 @@ static void test_custom_default_button(void)
...
@@ -599,11 +599,11 @@ static void test_custom_default_button(void)
psh
.
dwFlags
=
PSH_PROPSHEETPAGE
|
PSH_MODELESS
;
psh
.
dwFlags
=
PSH_PROPSHEETPAGE
|
PSH_MODELESS
;
psh
.
hwndParent
=
GetDesktopWindow
();
psh
.
hwndParent
=
GetDesktopWindow
();
psh
.
hInstance
=
GetModuleHandleA
(
NULL
);
psh
.
hInstance
=
GetModuleHandleA
(
NULL
);
U
(
psh
)
.
pszIcon
=
NULL
;
psh
.
pszIcon
=
NULL
;
psh
.
pszCaption
=
"PropertySheet1"
;
psh
.
pszCaption
=
"PropertySheet1"
;
psh
.
nPages
=
1
;
psh
.
nPages
=
1
;
U3
(
psh
)
.
ppsp
=
psp
;
psh
.
ppsp
=
psp
;
U2
(
psh
)
.
nStartPage
=
0
;
psh
.
nStartPage
=
0
;
/* The goal of the test is to make sure that the Add button is pressed
/* The goal of the test is to make sure that the Add button is pressed
* when the ENTER key is pressed and a different control, a combobox,
* when the ENTER key is pressed and a different control, a combobox,
...
@@ -818,8 +818,8 @@ static void test_messages(void)
...
@@ -818,8 +818,8 @@ static void test_messages(void)
psp
.
dwSize
=
sizeof
(
psp
);
psp
.
dwSize
=
sizeof
(
psp
);
psp
.
dwFlags
=
0
;
psp
.
dwFlags
=
0
;
psp
.
hInstance
=
GetModuleHandleA
(
NULL
);
psp
.
hInstance
=
GetModuleHandleA
(
NULL
);
U
(
psp
)
.
pszTemplate
=
(
LPCSTR
)
MAKEINTRESOURCE
(
IDD_PROP_PAGE_MESSAGE_TEST
);
psp
.
pszTemplate
=
(
LPCSTR
)
MAKEINTRESOURCE
(
IDD_PROP_PAGE_MESSAGE_TEST
);
U2
(
psp
)
.
pszIcon
=
NULL
;
psp
.
pszIcon
=
NULL
;
psp
.
pfnDlgProc
=
page_dlg_proc_messages
;
psp
.
pfnDlgProc
=
page_dlg_proc_messages
;
psp
.
lParam
=
0
;
psp
.
lParam
=
0
;
...
@@ -832,7 +832,7 @@ static void test_messages(void)
...
@@ -832,7 +832,7 @@ static void test_messages(void)
psh
.
pszCaption
=
"test caption"
;
psh
.
pszCaption
=
"test caption"
;
psh
.
nPages
=
1
;
psh
.
nPages
=
1
;
psh
.
hwndParent
=
GetDesktopWindow
();
psh
.
hwndParent
=
GetDesktopWindow
();
U3
(
psh
)
.
phpage
=
hpsp
;
psh
.
phpage
=
hpsp
;
psh
.
pfnCallback
=
sheet_callback_messages
;
psh
.
pfnCallback
=
sheet_callback_messages
;
hdlg
=
(
HWND
)
pPropertySheetA
(
&
psh
);
hdlg
=
(
HWND
)
pPropertySheetA
(
&
psh
);
...
@@ -858,8 +858,8 @@ static void test_PSM_ADDPAGE(void)
...
@@ -858,8 +858,8 @@ static void test_PSM_ADDPAGE(void)
psp
.
dwSize
=
sizeof
(
psp
);
psp
.
dwSize
=
sizeof
(
psp
);
psp
.
dwFlags
=
0
;
psp
.
dwFlags
=
0
;
psp
.
hInstance
=
GetModuleHandleA
(
NULL
);
psp
.
hInstance
=
GetModuleHandleA
(
NULL
);
U
(
psp
)
.
pszTemplate
=
(
LPCSTR
)
MAKEINTRESOURCE
(
IDD_PROP_PAGE_MESSAGE_TEST
);
psp
.
pszTemplate
=
(
LPCSTR
)
MAKEINTRESOURCE
(
IDD_PROP_PAGE_MESSAGE_TEST
);
U2
(
psp
)
.
pszIcon
=
NULL
;
psp
.
pszIcon
=
NULL
;
psp
.
pfnDlgProc
=
page_dlg_proc_messages
;
psp
.
pfnDlgProc
=
page_dlg_proc_messages
;
psp
.
lParam
=
0
;
psp
.
lParam
=
0
;
...
@@ -868,7 +868,7 @@ static void test_PSM_ADDPAGE(void)
...
@@ -868,7 +868,7 @@ static void test_PSM_ADDPAGE(void)
hpsp
[
1
]
=
pCreatePropertySheetPageA
(
&
psp
);
hpsp
[
1
]
=
pCreatePropertySheetPageA
(
&
psp
);
hpsp
[
2
]
=
pCreatePropertySheetPageA
(
&
psp
);
hpsp
[
2
]
=
pCreatePropertySheetPageA
(
&
psp
);
U
(
psp
)
.
pszTemplate
=
(
LPCSTR
)
MAKEINTRESOURCE
(
IDD_PROP_PAGE_ERROR
);
psp
.
pszTemplate
=
(
LPCSTR
)
MAKEINTRESOURCE
(
IDD_PROP_PAGE_ERROR
);
hpsp
[
3
]
=
pCreatePropertySheetPageA
(
&
psp
);
hpsp
[
3
]
=
pCreatePropertySheetPageA
(
&
psp
);
psp
.
dwFlags
=
PSP_PREMATURE
;
psp
.
dwFlags
=
PSP_PREMATURE
;
...
@@ -880,7 +880,7 @@ static void test_PSM_ADDPAGE(void)
...
@@ -880,7 +880,7 @@ static void test_PSM_ADDPAGE(void)
psh
.
pszCaption
=
"test caption"
;
psh
.
pszCaption
=
"test caption"
;
psh
.
nPages
=
1
;
psh
.
nPages
=
1
;
psh
.
hwndParent
=
GetDesktopWindow
();
psh
.
hwndParent
=
GetDesktopWindow
();
U3
(
psh
)
.
phpage
=
hpsp
;
psh
.
phpage
=
hpsp
;
hdlg
=
(
HWND
)
pPropertySheetA
(
&
psh
);
hdlg
=
(
HWND
)
pPropertySheetA
(
&
psh
);
ok
(
hdlg
!=
INVALID_HANDLE_VALUE
,
"got invalid handle %p
\n
"
,
hdlg
);
ok
(
hdlg
!=
INVALID_HANDLE_VALUE
,
"got invalid handle %p
\n
"
,
hdlg
);
...
@@ -948,8 +948,8 @@ static void test_PSM_INSERTPAGE(void)
...
@@ -948,8 +948,8 @@ static void test_PSM_INSERTPAGE(void)
psp
.
dwSize
=
sizeof
(
psp
);
psp
.
dwSize
=
sizeof
(
psp
);
psp
.
dwFlags
=
0
;
psp
.
dwFlags
=
0
;
psp
.
hInstance
=
GetModuleHandleA
(
NULL
);
psp
.
hInstance
=
GetModuleHandleA
(
NULL
);
U
(
psp
)
.
pszTemplate
=
(
LPCSTR
)
MAKEINTRESOURCE
(
IDD_PROP_PAGE_MESSAGE_TEST
);
psp
.
pszTemplate
=
(
LPCSTR
)
MAKEINTRESOURCE
(
IDD_PROP_PAGE_MESSAGE_TEST
);
U2
(
psp
)
.
pszIcon
=
NULL
;
psp
.
pszIcon
=
NULL
;
psp
.
pfnDlgProc
=
page_dlg_proc_messages
;
psp
.
pfnDlgProc
=
page_dlg_proc_messages
;
psp
.
lParam
=
0
;
psp
.
lParam
=
0
;
...
@@ -958,7 +958,7 @@ static void test_PSM_INSERTPAGE(void)
...
@@ -958,7 +958,7 @@ static void test_PSM_INSERTPAGE(void)
hpsp
[
1
]
=
pCreatePropertySheetPageA
(
&
psp
);
hpsp
[
1
]
=
pCreatePropertySheetPageA
(
&
psp
);
hpsp
[
2
]
=
pCreatePropertySheetPageA
(
&
psp
);
hpsp
[
2
]
=
pCreatePropertySheetPageA
(
&
psp
);
U
(
psp
)
.
pszTemplate
=
(
LPCSTR
)
MAKEINTRESOURCE
(
IDD_PROP_PAGE_ERROR
);
psp
.
pszTemplate
=
(
LPCSTR
)
MAKEINTRESOURCE
(
IDD_PROP_PAGE_ERROR
);
hpsp
[
3
]
=
pCreatePropertySheetPageA
(
&
psp
);
hpsp
[
3
]
=
pCreatePropertySheetPageA
(
&
psp
);
psp
.
dwFlags
=
PSP_PREMATURE
;
psp
.
dwFlags
=
PSP_PREMATURE
;
...
@@ -970,7 +970,7 @@ static void test_PSM_INSERTPAGE(void)
...
@@ -970,7 +970,7 @@ static void test_PSM_INSERTPAGE(void)
psh
.
pszCaption
=
"test caption"
;
psh
.
pszCaption
=
"test caption"
;
psh
.
nPages
=
1
;
psh
.
nPages
=
1
;
psh
.
hwndParent
=
GetDesktopWindow
();
psh
.
hwndParent
=
GetDesktopWindow
();
U3
(
psh
)
.
phpage
=
hpsp
;
psh
.
phpage
=
hpsp
;
hdlg
=
(
HWND
)
pPropertySheetA
(
&
psh
);
hdlg
=
(
HWND
)
pPropertySheetA
(
&
psh
);
ok
(
hdlg
!=
INVALID_HANDLE_VALUE
,
"got invalid handle %p
\n
"
,
hdlg
);
ok
(
hdlg
!=
INVALID_HANDLE_VALUE
,
"got invalid handle %p
\n
"
,
hdlg
);
...
@@ -1206,7 +1206,7 @@ static void test_bad_control_class(void)
...
@@ -1206,7 +1206,7 @@ static void test_bad_control_class(void)
memset
(
&
psp
,
0
,
sizeof
(
psp
));
memset
(
&
psp
,
0
,
sizeof
(
psp
));
psp
.
dwSize
=
sizeof
(
psp
);
psp
.
dwSize
=
sizeof
(
psp
);
psp
.
hInstance
=
GetModuleHandleA
(
NULL
);
psp
.
hInstance
=
GetModuleHandleA
(
NULL
);
U
(
psp
)
.
pszTemplate
=
(
LPCSTR
)
MAKEINTRESOURCE
(
IDD_PROP_PAGE_BAD_CONTROL
);
psp
.
pszTemplate
=
(
LPCSTR
)
MAKEINTRESOURCE
(
IDD_PROP_PAGE_BAD_CONTROL
);
psp
.
pfnDlgProc
=
page_dlg_proc
;
psp
.
pfnDlgProc
=
page_dlg_proc
;
hpsp
=
pCreatePropertySheetPageA
(
&
psp
);
hpsp
=
pCreatePropertySheetPageA
(
&
psp
);
...
@@ -1216,7 +1216,7 @@ static void test_bad_control_class(void)
...
@@ -1216,7 +1216,7 @@ static void test_bad_control_class(void)
psh
.
dwSize
=
PROPSHEETHEADERA_V1_SIZE
;
psh
.
dwSize
=
PROPSHEETHEADERA_V1_SIZE
;
psh
.
nPages
=
1
;
psh
.
nPages
=
1
;
psh
.
hwndParent
=
GetDesktopWindow
();
psh
.
hwndParent
=
GetDesktopWindow
();
U3
(
psh
)
.
phpage
=
&
hpsp
;
psh
.
phpage
=
&
hpsp
;
ret
=
pPropertySheetA
(
&
psh
);
ret
=
pPropertySheetA
(
&
psh
);
ok
(
ret
==
0
,
"got %Id
\n
"
,
ret
);
ok
(
ret
==
0
,
"got %Id
\n
"
,
ret
);
...
@@ -1224,7 +1224,7 @@ static void test_bad_control_class(void)
...
@@ -1224,7 +1224,7 @@ static void test_bad_control_class(void)
/* Need to recreate hpsp otherwise the test fails under Windows */
/* Need to recreate hpsp otherwise the test fails under Windows */
hpsp
=
pCreatePropertySheetPageA
(
&
psp
);
hpsp
=
pCreatePropertySheetPageA
(
&
psp
);
ok
(
hpsp
!=
0
,
"CreatePropertySheetPage failed
\n
"
);
ok
(
hpsp
!=
0
,
"CreatePropertySheetPage failed
\n
"
);
U3
(
psh
)
.
phpage
=
&
hpsp
;
psh
.
phpage
=
&
hpsp
;
psh
.
dwFlags
=
PSH_MODELESS
;
psh
.
dwFlags
=
PSH_MODELESS
;
ret
=
pPropertySheetA
(
&
psh
);
ret
=
pPropertySheetA
(
&
psh
);
...
@@ -1261,7 +1261,7 @@ static void test_page_dialog_texture(void)
...
@@ -1261,7 +1261,7 @@ static void test_page_dialog_texture(void)
memset
(
&
psp
,
0
,
sizeof
(
psp
));
memset
(
&
psp
,
0
,
sizeof
(
psp
));
psp
.
dwSize
=
sizeof
(
psp
);
psp
.
dwSize
=
sizeof
(
psp
);
psp
.
hInstance
=
GetModuleHandleA
(
NULL
);
psp
.
hInstance
=
GetModuleHandleA
(
NULL
);
U
(
psp
)
.
pszTemplate
=
"prop_page1"
;
psp
.
pszTemplate
=
"prop_page1"
;
psp
.
pfnDlgProc
=
test_WM_CTLCOLORSTATIC_proc
;
psp
.
pfnDlgProc
=
test_WM_CTLCOLORSTATIC_proc
;
hpsp
[
0
]
=
pCreatePropertySheetPageA
(
&
psp
);
hpsp
[
0
]
=
pCreatePropertySheetPageA
(
&
psp
);
...
@@ -1271,7 +1271,7 @@ static void test_page_dialog_texture(void)
...
@@ -1271,7 +1271,7 @@ static void test_page_dialog_texture(void)
psh
.
pszCaption
=
"caption"
;
psh
.
pszCaption
=
"caption"
;
psh
.
nPages
=
1
;
psh
.
nPages
=
1
;
psh
.
hwndParent
=
GetDesktopWindow
();
psh
.
hwndParent
=
GetDesktopWindow
();
U3
(
psh
)
.
phpage
=
hpsp
;
psh
.
phpage
=
hpsp
;
hdlg
=
(
HWND
)
pPropertySheetA
(
&
psh
);
hdlg
=
(
HWND
)
pPropertySheetA
(
&
psh
);
ok
(
hdlg
!=
INVALID_HANDLE_VALUE
,
"Got invalid handle value %p.
\n
"
,
hdlg
);
ok
(
hdlg
!=
INVALID_HANDLE_VALUE
,
"Got invalid handle value %p.
\n
"
,
hdlg
);
...
@@ -1321,8 +1321,8 @@ static void test_invalid_hpropsheetpage(void)
...
@@ -1321,8 +1321,8 @@ static void test_invalid_hpropsheetpage(void)
memset
(
psp
,
0
,
sizeof
(
*
psp
));
memset
(
psp
,
0
,
sizeof
(
*
psp
));
psp
->
dwSize
=
sizeof
(
*
psp
);
psp
->
dwSize
=
sizeof
(
*
psp
);
psp
->
hInstance
=
GetModuleHandleA
(
NULL
);
psp
->
hInstance
=
GetModuleHandleA
(
NULL
);
U
(
psp
)
->
pszTemplate
=
"prop_page1"
;
psp
->
pszTemplate
=
"prop_page1"
;
U2
(
psp
)
->
pszIcon
=
NULL
;
psp
->
pszIcon
=
NULL
;
psp
->
pfnDlgProc
=
page_dlg_proc
;
psp
->
pfnDlgProc
=
page_dlg_proc
;
psp
->
lParam
=
0
;
psp
->
lParam
=
0
;
...
@@ -1335,7 +1335,7 @@ static void test_invalid_hpropsheetpage(void)
...
@@ -1335,7 +1335,7 @@ static void test_invalid_hpropsheetpage(void)
psh
.
pszCaption
=
"test caption"
;
psh
.
pszCaption
=
"test caption"
;
psh
.
nPages
=
1
;
psh
.
nPages
=
1
;
psh
.
hwndParent
=
GetDesktopWindow
();
psh
.
hwndParent
=
GetDesktopWindow
();
U3
(
psh
)
.
phpage
=
hpsp
;
psh
.
phpage
=
hpsp
;
psh
.
pfnCallback
=
sheet_callback
;
psh
.
pfnCallback
=
sheet_callback
;
hdlg
=
(
HWND
)
pPropertySheetA
(
&
psh
);
hdlg
=
(
HWND
)
pPropertySheetA
(
&
psh
);
...
@@ -1349,8 +1349,8 @@ static void test_invalid_hpropsheetpage(void)
...
@@ -1349,8 +1349,8 @@ static void test_invalid_hpropsheetpage(void)
memset
(
pspW
,
0
,
sizeof
(
*
pspW
));
memset
(
pspW
,
0
,
sizeof
(
*
pspW
));
pspW
->
dwSize
=
sizeof
(
*
pspW
);
pspW
->
dwSize
=
sizeof
(
*
pspW
);
pspW
->
hInstance
=
GetModuleHandleA
(
NULL
);
pspW
->
hInstance
=
GetModuleHandleA
(
NULL
);
U
(
pspW
)
->
pszTemplate
=
L"prop_page1"
;
pspW
->
pszTemplate
=
L"prop_page1"
;
U2
(
pspW
)
->
pszIcon
=
NULL
;
pspW
->
pszIcon
=
NULL
;
pspW
->
pfnDlgProc
=
page_dlg_proc
;
pspW
->
pfnDlgProc
=
page_dlg_proc
;
pspW
->
lParam
=
0
;
pspW
->
lParam
=
0
;
...
@@ -1376,7 +1376,7 @@ static void test_invalid_hpropsheetpage(void)
...
@@ -1376,7 +1376,7 @@ static void test_invalid_hpropsheetpage(void)
pshW
.
pszCaption
=
L"test caption"
;
pshW
.
pszCaption
=
L"test caption"
;
pshW
.
nPages
=
1
;
pshW
.
nPages
=
1
;
pshW
.
hwndParent
=
GetDesktopWindow
();
pshW
.
hwndParent
=
GetDesktopWindow
();
U3
(
pshW
)
.
phpage
=
hpsp
;
pshW
.
phpage
=
hpsp
;
pshW
.
pfnCallback
=
sheet_callback
;
pshW
.
pfnCallback
=
sheet_callback
;
hdlg
=
(
HWND
)
pPropertySheetW
(
&
pshW
);
hdlg
=
(
HWND
)
pPropertySheetW
(
&
pshW
);
...
...
dlls/comctl32/tests/treeview.c
View file @
297a7349
...
@@ -485,14 +485,14 @@ static void fill_tree(HWND hTree)
...
@@ -485,14 +485,14 @@ static void fill_tree(HWND hTree)
ins
.
hParent
=
TVI_ROOT
;
ins
.
hParent
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_ROOT
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
root
;
ins
.
item
.
pszText
=
root
;
hRoot
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
hRoot
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ins
.
hParent
=
hRoot
;
ins
.
hParent
=
hRoot
;
ins
.
hInsertAfter
=
TVI_FIRST
;
ins
.
hInsertAfter
=
TVI_FIRST
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
child
;
ins
.
item
.
pszText
=
child
;
hChild
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
hChild
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
}
}
...
@@ -544,8 +544,8 @@ static void test_callback(void)
...
@@ -544,8 +544,8 @@ static void test_callback(void)
expect
(
TRUE
,
ret
);
expect
(
TRUE
,
ret
);
ins
.
hParent
=
TVI_ROOT
;
ins
.
hParent
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_ROOT
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
LPSTR_TEXTCALLBACKA
;
ins
.
item
.
pszText
=
LPSTR_TEXTCALLBACKA
;
hRoot
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
hRoot
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
hRoot
!=
NULL
,
"failed to set root
\n
"
);
ok
(
hRoot
!=
NULL
,
"failed to set root
\n
"
);
...
@@ -560,8 +560,8 @@ static void test_callback(void)
...
@@ -560,8 +560,8 @@ static void test_callback(void)
ins
.
hParent
=
hRoot
;
ins
.
hParent
=
hRoot
;
ins
.
hInsertAfter
=
TVI_FIRST
;
ins
.
hInsertAfter
=
TVI_FIRST
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
test_string
;
ins
.
item
.
pszText
=
test_string
;
hItem1
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
hItem1
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
hItem1
!=
NULL
,
"failed to set Item1
\n
"
);
ok
(
hItem1
!=
NULL
,
"failed to set Item1
\n
"
);
...
@@ -581,7 +581,7 @@ static void test_callback(void)
...
@@ -581,7 +581,7 @@ static void test_callback(void)
ok
(
strcmp
(
tvi
.
pszText
,
TEST_CALLBACK_TEXT
)
==
0
,
"Item text mismatch %s vs %s
\n
"
,
ok
(
strcmp
(
tvi
.
pszText
,
TEST_CALLBACK_TEXT
)
==
0
,
"Item text mismatch %s vs %s
\n
"
,
tvi
.
pszText
,
TEST_CALLBACK_TEXT
);
tvi
.
pszText
,
TEST_CALLBACK_TEXT
);
U
(
ins
)
.
item
.
pszText
=
NULL
;
ins
.
item
.
pszText
=
NULL
;
hItem2
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
hItem2
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
hItem2
!=
NULL
,
"failed to set Item2
\n
"
);
ok
(
hItem2
!=
NULL
,
"failed to set Item2
\n
"
);
tvi
.
hItem
=
hItem2
;
tvi
.
hItem
=
hItem2
;
...
@@ -741,9 +741,9 @@ static void test_getitemtext(void)
...
@@ -741,9 +741,9 @@ static void test_getitemtext(void)
/* add an item without TVIF_TEXT mask and pszText == NULL */
/* add an item without TVIF_TEXT mask and pszText == NULL */
ins
.
hParent
=
hRoot
;
ins
.
hParent
=
hRoot
;
ins
.
hInsertAfter
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_ROOT
;
U
(
ins
)
.
item
.
mask
=
0
;
ins
.
item
.
mask
=
0
;
U
(
ins
)
.
item
.
pszText
=
NULL
;
ins
.
item
.
pszText
=
NULL
;
U
(
ins
)
.
item
.
cchTextMax
=
0
;
ins
.
item
.
cchTextMax
=
0
;
hChild
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
hChild
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
hChild
!=
NULL
,
"failed to set hChild
\n
"
);
ok
(
hChild
!=
NULL
,
"failed to set hChild
\n
"
);
...
@@ -782,13 +782,13 @@ static void test_focus(void)
...
@@ -782,13 +782,13 @@ static void test_focus(void)
*/
*/
ins
.
hParent
=
hRoot
;
ins
.
hParent
=
hRoot
;
ins
.
hInsertAfter
=
hChild
;
ins
.
hInsertAfter
=
hChild
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
child1
;
ins
.
item
.
pszText
=
child1
;
hChild1
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
hChild1
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
hChild1
!=
NULL
,
"failed to set hChild1
\n
"
);
ok
(
hChild1
!=
NULL
,
"failed to set hChild1
\n
"
);
ins
.
hInsertAfter
=
hChild1
;
ins
.
hInsertAfter
=
hChild1
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
child2
;
ins
.
item
.
pszText
=
child2
;
hChild2
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
hChild2
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
hChild2
!=
NULL
,
"failed to set hChild2
\n
"
);
ok
(
hChild2
!=
NULL
,
"failed to set hChild2
\n
"
);
...
@@ -1510,28 +1510,28 @@ static void test_expandinvisible(void)
...
@@ -1510,28 +1510,28 @@ static void test_expandinvisible(void)
ok
(
ret
==
TRUE
,
"ret
\n
"
);
ok
(
ret
==
TRUE
,
"ret
\n
"
);
ins
.
hParent
=
TVI_ROOT
;
ins
.
hParent
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_ROOT
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
nodeText
[
0
];
ins
.
item
.
pszText
=
nodeText
[
0
];
node
[
0
]
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
node
[
0
]
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
node
[
0
]
!=
NULL
,
"failed to set node[0]
\n
"
);
ok
(
node
[
0
]
!=
NULL
,
"failed to set node[0]
\n
"
);
ins
.
hInsertAfter
=
TVI_LAST
;
ins
.
hInsertAfter
=
TVI_LAST
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
mask
=
TVIF_TEXT
;
ins
.
hParent
=
node
[
0
];
ins
.
hParent
=
node
[
0
];
U
(
ins
)
.
item
.
pszText
=
nodeText
[
1
];
ins
.
item
.
pszText
=
nodeText
[
1
];
node
[
1
]
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
node
[
1
]
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
node
[
1
]
!=
NULL
,
"failed to set node[1]
\n
"
);
ok
(
node
[
1
]
!=
NULL
,
"failed to set node[1]
\n
"
);
U
(
ins
)
.
item
.
pszText
=
nodeText
[
4
];
ins
.
item
.
pszText
=
nodeText
[
4
];
node
[
4
]
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
node
[
4
]
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
node
[
4
]
!=
NULL
,
"failed to set node[4]
\n
"
);
ok
(
node
[
4
]
!=
NULL
,
"failed to set node[4]
\n
"
);
ins
.
hParent
=
node
[
1
];
ins
.
hParent
=
node
[
1
];
U
(
ins
)
.
item
.
pszText
=
nodeText
[
2
];
ins
.
item
.
pszText
=
nodeText
[
2
];
node
[
2
]
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
node
[
2
]
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
node
[
2
]
!=
NULL
,
"failed to set node[2]
\n
"
);
ok
(
node
[
2
]
!=
NULL
,
"failed to set node[2]
\n
"
);
U
(
ins
)
.
item
.
pszText
=
nodeText
[
3
];
ins
.
item
.
pszText
=
nodeText
[
3
];
node
[
3
]
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
node
[
3
]
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
node
[
3
]
!=
NULL
,
"failed to set node[3]
\n
"
);
ok
(
node
[
3
]
!=
NULL
,
"failed to set node[3]
\n
"
);
...
@@ -1579,7 +1579,7 @@ static void test_expand(void)
...
@@ -1579,7 +1579,7 @@ static void test_expand(void)
ins
.
hParent
=
TVI_ROOT
;
ins
.
hParent
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_LAST
;
ins
.
hInsertAfter
=
TVI_LAST
;
U
(
ins
)
.
item
.
mask
=
0
;
ins
.
item
.
mask
=
0
;
first
=
TreeView_InsertItemA
(
tv
,
&
ins
);
first
=
TreeView_InsertItemA
(
tv
,
&
ins
);
ok
(
first
!=
NULL
,
"failed to insert first node
\n
"
);
ok
(
first
!=
NULL
,
"failed to insert first node
\n
"
);
second
=
TreeView_InsertItemA
(
tv
,
&
ins
);
second
=
TreeView_InsertItemA
(
tv
,
&
ins
);
...
@@ -2111,8 +2111,8 @@ static void test_TVS_SINGLEEXPAND(void)
...
@@ -2111,8 +2111,8 @@ static void test_TVS_SINGLEEXPAND(void)
{
{
ins
.
hParent
=
items
[
i
].
parent
?
*
items
[
i
].
parent
:
TVI_ROOT
;
ins
.
hParent
=
items
[
i
].
parent
?
*
items
[
i
].
parent
:
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_FIRST
;
ins
.
hInsertAfter
=
TVI_FIRST
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
foo
;
ins
.
item
.
pszText
=
foo
;
*
items
[
i
].
handle
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
*
items
[
i
].
handle
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
}
}
...
@@ -2282,15 +2282,15 @@ static void test_delete_items(void)
...
@@ -2282,15 +2282,15 @@ static void test_delete_items(void)
ins
.
hParent
=
TVI_ROOT
;
ins
.
hParent
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_ROOT
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
item1
;
ins
.
item
.
pszText
=
item1
;
hItem1
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
hItem1
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
hItem1
!=
NULL
,
"InsertItem failed
\n
"
);
ok
(
hItem1
!=
NULL
,
"InsertItem failed
\n
"
);
ins
.
hParent
=
TVI_ROOT
;
ins
.
hParent
=
TVI_ROOT
;
ins
.
hInsertAfter
=
hItem1
;
ins
.
hInsertAfter
=
hItem1
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
item2
;
ins
.
item
.
pszText
=
item2
;
hItem2
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
hItem2
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
hItem2
!=
NULL
,
"InsertItem failed
\n
"
);
ok
(
hItem2
!=
NULL
,
"InsertItem failed
\n
"
);
...
@@ -2429,14 +2429,14 @@ static void test_htreeitem_layout(BOOL is_version_6)
...
@@ -2429,14 +2429,14 @@ static void test_htreeitem_layout(BOOL is_version_6)
ins
.
hParent
=
hChild
;
ins
.
hParent
=
hChild
;
ins
.
hInsertAfter
=
TVI_FIRST
;
ins
.
hInsertAfter
=
TVI_FIRST
;
U
(
ins
)
.
item
.
mask
=
0
;
ins
.
item
.
mask
=
0
;
item1
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
item1
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
CHECK_ITEM
(
hTree
,
item1
);
CHECK_ITEM
(
hTree
,
item1
);
ins
.
hParent
=
hRoot
;
ins
.
hParent
=
hRoot
;
ins
.
hInsertAfter
=
TVI_FIRST
;
ins
.
hInsertAfter
=
TVI_FIRST
;
U
(
ins
)
.
item
.
mask
=
0
;
ins
.
item
.
mask
=
0
;
item2
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
item2
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
CHECK_ITEM
(
hTree
,
item2
);
CHECK_ITEM
(
hTree
,
item2
);
...
@@ -2760,8 +2760,8 @@ static void test_WM_KEYDOWN(void)
...
@@ -2760,8 +2760,8 @@ static void test_WM_KEYDOWN(void)
ins
.
hParent
=
TVI_ROOT
;
ins
.
hParent
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_ROOT
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
(
char
*
)
rootA
;
ins
.
item
.
pszText
=
(
char
*
)
rootA
;
hRoot
=
TreeView_InsertItemA
(
hwnd
,
&
ins
);
hRoot
=
TreeView_InsertItemA
(
hwnd
,
&
ins
);
ok
(
hRoot
!=
NULL
,
"got %p
\n
"
,
hRoot
);
ok
(
hRoot
!=
NULL
,
"got %p
\n
"
,
hRoot
);
...
@@ -2841,31 +2841,31 @@ static void fill_treeview_sort_test(HWND hwnd)
...
@@ -2841,31 +2841,31 @@ static void fill_treeview_sort_test(HWND hwnd)
/* root, two children, with two children each */
/* root, two children, with two children each */
ins
.
hParent
=
TVI_ROOT
;
ins
.
hParent
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_ROOT
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
ins
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
root
=
(
HTREEITEM
)
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
root
=
(
HTREEITEM
)
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
ins
.
hParent
=
root
;
ins
.
hParent
=
root
;
ins
.
hInsertAfter
=
TVI_LAST
;
ins
.
hInsertAfter
=
TVI_LAST
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
ins
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
children
[
0
]
=
(
HTREEITEM
)
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
children
[
0
]
=
(
HTREEITEM
)
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
U
(
ins
)
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
ins
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
children
[
1
]
=
(
HTREEITEM
)
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
children
[
1
]
=
(
HTREEITEM
)
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
ins
.
hParent
=
children
[
0
];
ins
.
hParent
=
children
[
0
];
U
(
ins
)
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
ins
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
U
(
ins
)
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
ins
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
ins
.
hParent
=
children
[
1
];
ins
.
hParent
=
children
[
1
];
U
(
ins
)
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
ins
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
U
(
ins
)
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
ins
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
}
}
...
@@ -2891,8 +2891,8 @@ static void test_TVM_SORTCHILDREN(void)
...
@@ -2891,8 +2891,8 @@ static void test_TVM_SORTCHILDREN(void)
/* add only root, sort from it */
/* add only root, sort from it */
ins
.
hParent
=
TVI_ROOT
;
ins
.
hParent
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_ROOT
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
(
char
*
)
"root"
;
ins
.
item
.
pszText
=
(
char
*
)
"root"
;
root
=
(
HTREEITEM
)
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
root
=
(
HTREEITEM
)
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
ok
(
root
!=
NULL
,
"Expected root node
\n
"
);
ok
(
root
!=
NULL
,
"Expected root node
\n
"
);
...
@@ -2962,19 +2962,19 @@ static void test_TVM_SORTCHILDREN(void)
...
@@ -2962,19 +2962,19 @@ static void test_TVM_SORTCHILDREN(void)
ins
.
hParent
=
TVI_ROOT
;
ins
.
hParent
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_ROOT
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
(
char
*
)
"root"
;
ins
.
item
.
pszText
=
(
char
*
)
"root"
;
root
=
(
HTREEITEM
)
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
root
=
(
HTREEITEM
)
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
ok
(
root
!=
NULL
,
"Expected root node
\n
"
);
ok
(
root
!=
NULL
,
"Expected root node
\n
"
);
ins
.
hParent
=
root
;
ins
.
hParent
=
root
;
ins
.
hInsertAfter
=
TVI_LAST
;
ins
.
hInsertAfter
=
TVI_LAST
;
U
(
ins
)
.
item
.
pszText
=
(
char
*
)
"I1"
;
ins
.
item
.
pszText
=
(
char
*
)
"I1"
;
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
ins
.
hParent
=
root
;
ins
.
hParent
=
root
;
ins
.
hInsertAfter
=
TVI_LAST
;
ins
.
hInsertAfter
=
TVI_LAST
;
U
(
ins
)
.
item
.
pszText
=
(
char
*
)
"i1"
;
ins
.
item
.
pszText
=
(
char
*
)
"i1"
;
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
ret
=
SendMessageA
(
hwnd
,
TVM_SORTCHILDREN
,
TRUE
,
(
LPARAM
)
root
);
ret
=
SendMessageA
(
hwnd
,
TVM_SORTCHILDREN
,
TRUE
,
(
LPARAM
)
root
);
...
...
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