Commit 297a7349 authored by Alexandre Julliard's avatar Alexandre Julliard

comctl32/tests: Use nameless unions/structs.

parent 573e20e9
......@@ -161,8 +161,8 @@ static void test_title(void)
psp.dwFlags = PSP_USETITLE;
psp.hInstance = GetModuleHandleA(NULL);
psp.pszTitle = "page title";
U(psp).pszTemplate = "prop_page1";
U2(psp).pszIcon = NULL;
psp.pszTemplate = "prop_page1";
psp.pszIcon = NULL;
psp.pfnDlgProc = page_dlg_proc;
psp.lParam = 0;
......@@ -174,7 +174,7 @@ static void test_title(void)
psh.pszCaption = "test caption";
psh.nPages = 1;
psh.hwndParent = GetDesktopWindow();
U3(psh).phpage = hpsp;
psh.phpage = hpsp;
psh.pfnCallback = sheet_callback;
hdlg = (HWND)pPropertySheetA(&psh);
......@@ -200,8 +200,8 @@ static void test_nopage(void)
psp.dwSize = sizeof(psp);
psp.dwFlags = 0;
psp.hInstance = GetModuleHandleA(NULL);
U(psp).pszTemplate = "prop_page1";
U2(psp).pszIcon = NULL;
psp.pszTemplate = "prop_page1";
psp.pszIcon = NULL;
psp.pfnDlgProc = page_dlg_proc;
psp.lParam = 0;
......@@ -213,7 +213,7 @@ static void test_nopage(void)
psh.pszCaption = "test caption";
psh.nPages = 1;
psh.hwndParent = GetDesktopWindow();
U3(psh).phpage = hpsp;
psh.phpage = hpsp;
psh.pfnCallback = sheet_callback;
hdlg = (HWND)pPropertySheetA(&psh);
......@@ -280,8 +280,8 @@ static void test_disableowner(void)
psp.dwSize = sizeof(psp);
psp.dwFlags = 0;
psp.hInstance = GetModuleHandleA(NULL);
U(psp).pszTemplate = "prop_page1";
U2(psp).pszIcon = NULL;
psp.pszTemplate = "prop_page1";
psp.pszIcon = NULL;
psp.pfnDlgProc = NULL;
psp.lParam = 0;
......@@ -293,7 +293,7 @@ static void test_disableowner(void)
psh.pszCaption = "test caption";
psh.nPages = 1;
psh.hwndParent = parenthwnd;
U3(psh).phpage = hpsp;
psh.phpage = hpsp;
psh.pfnCallback = disableowner_callback;
p = pPropertySheetA(&psh);
......@@ -379,25 +379,25 @@ static void test_wiznavigation(void)
psp[0].dwSize = sizeof(PROPSHEETPAGEA);
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;
hpsp[0] = pCreatePropertySheetPageA(&psp[0]);
psp[1].dwSize = sizeof(PROPSHEETPAGEA);
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;
hpsp[1] = pCreatePropertySheetPageA(&psp[1]);
psp[2].dwSize = sizeof(PROPSHEETPAGEA);
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;
hpsp[2] = pCreatePropertySheetPageA(&psp[2]);
psp[3].dwSize = sizeof(PROPSHEETPAGEA);
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;
hpsp[3] = pCreatePropertySheetPageA(&psp[3]);
......@@ -408,7 +408,7 @@ static void test_wiznavigation(void)
psh.pszCaption = "A Wizard";
psh.nPages = 4;
psh.hwndParent = GetDesktopWindow();
U3(psh).phpage = hpsp;
psh.phpage = hpsp;
hdlg = (HWND)pPropertySheetA(&psh);
ok(hdlg != INVALID_HANDLE_VALUE, "got invalid handle %p\n", hdlg);
......@@ -499,8 +499,8 @@ static void test_buttons(void)
psp.dwSize = sizeof(psp);
psp.dwFlags = 0;
psp.hInstance = GetModuleHandleA(NULL);
U(psp).pszTemplate = "prop_page1";
U2(psp).pszIcon = NULL;
psp.pszTemplate = "prop_page1";
psp.pszIcon = NULL;
psp.pfnDlgProc = page_dlg_proc;
psp.lParam = 0;
......@@ -512,7 +512,7 @@ static void test_buttons(void)
psh.pszCaption = "test caption";
psh.nPages = 1;
psh.hwndParent = GetDesktopWindow();
U3(psh).phpage = hpsp;
psh.phpage = hpsp;
psh.pfnCallback = sheet_callback;
hdlg = (HWND)pPropertySheetA(&psh);
......@@ -589,8 +589,8 @@ static void test_custom_default_button(void)
psp[0].dwSize = sizeof (PROPSHEETPAGEA);
psp[0].dwFlags = PSP_USETITLE;
psp[0].hInstance = GetModuleHandleA(NULL);
U(psp[0]).pszTemplate = (LPCSTR)MAKEINTRESOURCE(IDD_PROP_PAGE_WITH_CUSTOM_DEFAULT_BUTTON);
U2(psp[0]).pszIcon = NULL;
psp[0].pszTemplate = (LPCSTR)MAKEINTRESOURCE(IDD_PROP_PAGE_WITH_CUSTOM_DEFAULT_BUTTON);
psp[0].pszIcon = NULL;
psp[0].pfnDlgProc = page_with_custom_default_button_dlg_proc;
psp[0].pszTitle = "Page1";
psp[0].lParam = 0;
......@@ -599,11 +599,11 @@ static void test_custom_default_button(void)
psh.dwFlags = PSH_PROPSHEETPAGE | PSH_MODELESS;
psh.hwndParent = GetDesktopWindow();
psh.hInstance = GetModuleHandleA(NULL);
U(psh).pszIcon = NULL;
psh.pszIcon = NULL;
psh.pszCaption = "PropertySheet1";
psh.nPages = 1;
U3(psh).ppsp = psp;
U2(psh).nStartPage = 0;
psh.ppsp = psp;
psh.nStartPage = 0;
/* 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,
......@@ -818,8 +818,8 @@ static void test_messages(void)
psp.dwSize = sizeof(psp);
psp.dwFlags = 0;
psp.hInstance = GetModuleHandleA(NULL);
U(psp).pszTemplate = (LPCSTR)MAKEINTRESOURCE(IDD_PROP_PAGE_MESSAGE_TEST);
U2(psp).pszIcon = NULL;
psp.pszTemplate = (LPCSTR)MAKEINTRESOURCE(IDD_PROP_PAGE_MESSAGE_TEST);
psp.pszIcon = NULL;
psp.pfnDlgProc = page_dlg_proc_messages;
psp.lParam = 0;
......@@ -832,7 +832,7 @@ static void test_messages(void)
psh.pszCaption = "test caption";
psh.nPages = 1;
psh.hwndParent = GetDesktopWindow();
U3(psh).phpage = hpsp;
psh.phpage = hpsp;
psh.pfnCallback = sheet_callback_messages;
hdlg = (HWND)pPropertySheetA(&psh);
......@@ -858,8 +858,8 @@ static void test_PSM_ADDPAGE(void)
psp.dwSize = sizeof(psp);
psp.dwFlags = 0;
psp.hInstance = GetModuleHandleA(NULL);
U(psp).pszTemplate = (LPCSTR)MAKEINTRESOURCE(IDD_PROP_PAGE_MESSAGE_TEST);
U2(psp).pszIcon = NULL;
psp.pszTemplate = (LPCSTR)MAKEINTRESOURCE(IDD_PROP_PAGE_MESSAGE_TEST);
psp.pszIcon = NULL;
psp.pfnDlgProc = page_dlg_proc_messages;
psp.lParam = 0;
......@@ -868,7 +868,7 @@ static void test_PSM_ADDPAGE(void)
hpsp[1] = 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);
psp.dwFlags = PSP_PREMATURE;
......@@ -880,7 +880,7 @@ static void test_PSM_ADDPAGE(void)
psh.pszCaption = "test caption";
psh.nPages = 1;
psh.hwndParent = GetDesktopWindow();
U3(psh).phpage = hpsp;
psh.phpage = hpsp;
hdlg = (HWND)pPropertySheetA(&psh);
ok(hdlg != INVALID_HANDLE_VALUE, "got invalid handle %p\n", hdlg);
......@@ -948,8 +948,8 @@ static void test_PSM_INSERTPAGE(void)
psp.dwSize = sizeof(psp);
psp.dwFlags = 0;
psp.hInstance = GetModuleHandleA(NULL);
U(psp).pszTemplate = (LPCSTR)MAKEINTRESOURCE(IDD_PROP_PAGE_MESSAGE_TEST);
U2(psp).pszIcon = NULL;
psp.pszTemplate = (LPCSTR)MAKEINTRESOURCE(IDD_PROP_PAGE_MESSAGE_TEST);
psp.pszIcon = NULL;
psp.pfnDlgProc = page_dlg_proc_messages;
psp.lParam = 0;
......@@ -958,7 +958,7 @@ static void test_PSM_INSERTPAGE(void)
hpsp[1] = 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);
psp.dwFlags = PSP_PREMATURE;
......@@ -970,7 +970,7 @@ static void test_PSM_INSERTPAGE(void)
psh.pszCaption = "test caption";
psh.nPages = 1;
psh.hwndParent = GetDesktopWindow();
U3(psh).phpage = hpsp;
psh.phpage = hpsp;
hdlg = (HWND)pPropertySheetA(&psh);
ok(hdlg != INVALID_HANDLE_VALUE, "got invalid handle %p\n", hdlg);
......@@ -1206,7 +1206,7 @@ static void test_bad_control_class(void)
memset(&psp, 0, sizeof(psp));
psp.dwSize = sizeof(psp);
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;
hpsp = pCreatePropertySheetPageA(&psp);
......@@ -1216,7 +1216,7 @@ static void test_bad_control_class(void)
psh.dwSize = PROPSHEETHEADERA_V1_SIZE;
psh.nPages = 1;
psh.hwndParent = GetDesktopWindow();
U3(psh).phpage = &hpsp;
psh.phpage = &hpsp;
ret = pPropertySheetA(&psh);
ok(ret == 0, "got %Id\n", ret);
......@@ -1224,7 +1224,7 @@ static void test_bad_control_class(void)
/* Need to recreate hpsp otherwise the test fails under Windows */
hpsp = pCreatePropertySheetPageA(&psp);
ok(hpsp != 0, "CreatePropertySheetPage failed\n");
U3(psh).phpage = &hpsp;
psh.phpage = &hpsp;
psh.dwFlags = PSH_MODELESS;
ret = pPropertySheetA(&psh);
......@@ -1261,7 +1261,7 @@ static void test_page_dialog_texture(void)
memset(&psp, 0, sizeof(psp));
psp.dwSize = sizeof(psp);
psp.hInstance = GetModuleHandleA(NULL);
U(psp).pszTemplate = "prop_page1";
psp.pszTemplate = "prop_page1";
psp.pfnDlgProc = test_WM_CTLCOLORSTATIC_proc;
hpsp[0] = pCreatePropertySheetPageA(&psp);
......@@ -1271,7 +1271,7 @@ static void test_page_dialog_texture(void)
psh.pszCaption = "caption";
psh.nPages = 1;
psh.hwndParent = GetDesktopWindow();
U3(psh).phpage = hpsp;
psh.phpage = hpsp;
hdlg = (HWND)pPropertySheetA(&psh);
ok(hdlg != INVALID_HANDLE_VALUE, "Got invalid handle value %p.\n", hdlg);
......@@ -1321,8 +1321,8 @@ static void test_invalid_hpropsheetpage(void)
memset(psp, 0, sizeof(*psp));
psp->dwSize = sizeof(*psp);
psp->hInstance = GetModuleHandleA(NULL);
U(psp)->pszTemplate = "prop_page1";
U2(psp)->pszIcon = NULL;
psp->pszTemplate = "prop_page1";
psp->pszIcon = NULL;
psp->pfnDlgProc = page_dlg_proc;
psp->lParam = 0;
......@@ -1335,7 +1335,7 @@ static void test_invalid_hpropsheetpage(void)
psh.pszCaption = "test caption";
psh.nPages = 1;
psh.hwndParent = GetDesktopWindow();
U3(psh).phpage = hpsp;
psh.phpage = hpsp;
psh.pfnCallback = sheet_callback;
hdlg = (HWND)pPropertySheetA(&psh);
......@@ -1349,8 +1349,8 @@ static void test_invalid_hpropsheetpage(void)
memset(pspW, 0, sizeof(*pspW));
pspW->dwSize = sizeof(*pspW);
pspW->hInstance = GetModuleHandleA(NULL);
U(pspW)->pszTemplate = L"prop_page1";
U2(pspW)->pszIcon = NULL;
pspW->pszTemplate = L"prop_page1";
pspW->pszIcon = NULL;
pspW->pfnDlgProc = page_dlg_proc;
pspW->lParam = 0;
......@@ -1376,7 +1376,7 @@ static void test_invalid_hpropsheetpage(void)
pshW.pszCaption = L"test caption";
pshW.nPages = 1;
pshW.hwndParent = GetDesktopWindow();
U3(pshW).phpage = hpsp;
pshW.phpage = hpsp;
pshW.pfnCallback = sheet_callback;
hdlg = (HWND)pPropertySheetW(&pshW);
......
......@@ -485,14 +485,14 @@ static void fill_tree(HWND hTree)
ins.hParent = TVI_ROOT;
ins.hInsertAfter = TVI_ROOT;
U(ins).item.mask = TVIF_TEXT;
U(ins).item.pszText = root;
ins.item.mask = TVIF_TEXT;
ins.item.pszText = root;
hRoot = TreeView_InsertItemA(hTree, &ins);
ins.hParent = hRoot;
ins.hInsertAfter = TVI_FIRST;
U(ins).item.mask = TVIF_TEXT;
U(ins).item.pszText = child;
ins.item.mask = TVIF_TEXT;
ins.item.pszText = child;
hChild = TreeView_InsertItemA(hTree, &ins);
}
......@@ -544,8 +544,8 @@ static void test_callback(void)
expect(TRUE, ret);
ins.hParent = TVI_ROOT;
ins.hInsertAfter = TVI_ROOT;
U(ins).item.mask = TVIF_TEXT;
U(ins).item.pszText = LPSTR_TEXTCALLBACKA;
ins.item.mask = TVIF_TEXT;
ins.item.pszText = LPSTR_TEXTCALLBACKA;
hRoot = TreeView_InsertItemA(hTree, &ins);
ok(hRoot != NULL, "failed to set root\n");
......@@ -560,8 +560,8 @@ static void test_callback(void)
ins.hParent = hRoot;
ins.hInsertAfter = TVI_FIRST;
U(ins).item.mask = TVIF_TEXT;
U(ins).item.pszText = test_string;
ins.item.mask = TVIF_TEXT;
ins.item.pszText = test_string;
hItem1 = TreeView_InsertItemA(hTree, &ins);
ok(hItem1 != NULL, "failed to set Item1\n");
......@@ -581,7 +581,7 @@ static void test_callback(void)
ok(strcmp(tvi.pszText, TEST_CALLBACK_TEXT) == 0, "Item text mismatch %s vs %s\n",
tvi.pszText, TEST_CALLBACK_TEXT);
U(ins).item.pszText = NULL;
ins.item.pszText = NULL;
hItem2 = TreeView_InsertItemA(hTree, &ins);
ok(hItem2 != NULL, "failed to set Item2\n");
tvi.hItem = hItem2;
......@@ -741,9 +741,9 @@ static void test_getitemtext(void)
/* add an item without TVIF_TEXT mask and pszText == NULL */
ins.hParent = hRoot;
ins.hInsertAfter = TVI_ROOT;
U(ins).item.mask = 0;
U(ins).item.pszText = NULL;
U(ins).item.cchTextMax = 0;
ins.item.mask = 0;
ins.item.pszText = NULL;
ins.item.cchTextMax = 0;
hChild = TreeView_InsertItemA(hTree, &ins);
ok(hChild != NULL, "failed to set hChild\n");
......@@ -782,13 +782,13 @@ static void test_focus(void)
*/
ins.hParent = hRoot;
ins.hInsertAfter = hChild;
U(ins).item.mask = TVIF_TEXT;
U(ins).item.pszText = child1;
ins.item.mask = TVIF_TEXT;
ins.item.pszText = child1;
hChild1 = TreeView_InsertItemA(hTree, &ins);
ok(hChild1 != NULL, "failed to set hChild1\n");
ins.hInsertAfter = hChild1;
U(ins).item.mask = TVIF_TEXT;
U(ins).item.pszText = child2;
ins.item.mask = TVIF_TEXT;
ins.item.pszText = child2;
hChild2 = TreeView_InsertItemA(hTree, &ins);
ok(hChild2 != NULL, "failed to set hChild2\n");
......@@ -1510,28 +1510,28 @@ static void test_expandinvisible(void)
ok(ret == TRUE, "ret\n");
ins.hParent = TVI_ROOT;
ins.hInsertAfter = TVI_ROOT;
U(ins).item.mask = TVIF_TEXT;
U(ins).item.pszText = nodeText[0];
ins.item.mask = TVIF_TEXT;
ins.item.pszText = nodeText[0];
node[0] = TreeView_InsertItemA(hTree, &ins);
ok(node[0] != NULL, "failed to set node[0]\n");
ins.hInsertAfter = TVI_LAST;
U(ins).item.mask = TVIF_TEXT;
ins.item.mask = TVIF_TEXT;
ins.hParent = node[0];
U(ins).item.pszText = nodeText[1];
ins.item.pszText = nodeText[1];
node[1] = TreeView_InsertItemA(hTree, &ins);
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);
ok(node[4] != NULL, "failed to set node[4]\n");
ins.hParent = node[1];
U(ins).item.pszText = nodeText[2];
ins.item.pszText = nodeText[2];
node[2] = TreeView_InsertItemA(hTree, &ins);
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);
ok(node[3] != NULL, "failed to set node[3]\n");
......@@ -1579,7 +1579,7 @@ static void test_expand(void)
ins.hParent = TVI_ROOT;
ins.hInsertAfter = TVI_LAST;
U(ins).item.mask = 0;
ins.item.mask = 0;
first = TreeView_InsertItemA(tv, &ins);
ok(first != NULL, "failed to insert first node\n");
second = TreeView_InsertItemA(tv, &ins);
......@@ -2111,8 +2111,8 @@ static void test_TVS_SINGLEEXPAND(void)
{
ins.hParent = items[i].parent ? *items[i].parent : TVI_ROOT;
ins.hInsertAfter = TVI_FIRST;
U(ins).item.mask = TVIF_TEXT;
U(ins).item.pszText = foo;
ins.item.mask = TVIF_TEXT;
ins.item.pszText = foo;
*items[i].handle = TreeView_InsertItemA(hTree, &ins);
}
......@@ -2282,15 +2282,15 @@ static void test_delete_items(void)
ins.hParent = TVI_ROOT;
ins.hInsertAfter = TVI_ROOT;
U(ins).item.mask = TVIF_TEXT;
U(ins).item.pszText = item1;
ins.item.mask = TVIF_TEXT;
ins.item.pszText = item1;
hItem1 = TreeView_InsertItemA(hTree, &ins);
ok(hItem1 != NULL, "InsertItem failed\n");
ins.hParent = TVI_ROOT;
ins.hInsertAfter = hItem1;
U(ins).item.mask = TVIF_TEXT;
U(ins).item.pszText = item2;
ins.item.mask = TVIF_TEXT;
ins.item.pszText = item2;
hItem2 = TreeView_InsertItemA(hTree, &ins);
ok(hItem2 != NULL, "InsertItem failed\n");
......@@ -2429,14 +2429,14 @@ static void test_htreeitem_layout(BOOL is_version_6)
ins.hParent = hChild;
ins.hInsertAfter = TVI_FIRST;
U(ins).item.mask = 0;
ins.item.mask = 0;
item1 = TreeView_InsertItemA(hTree, &ins);
CHECK_ITEM(hTree, item1);
ins.hParent = hRoot;
ins.hInsertAfter = TVI_FIRST;
U(ins).item.mask = 0;
ins.item.mask = 0;
item2 = TreeView_InsertItemA(hTree, &ins);
CHECK_ITEM(hTree, item2);
......@@ -2760,8 +2760,8 @@ static void test_WM_KEYDOWN(void)
ins.hParent = TVI_ROOT;
ins.hInsertAfter = TVI_ROOT;
U(ins).item.mask = TVIF_TEXT;
U(ins).item.pszText = (char*)rootA;
ins.item.mask = TVIF_TEXT;
ins.item.pszText = (char*)rootA;
hRoot = TreeView_InsertItemA(hwnd, &ins);
ok(hRoot != NULL, "got %p\n", hRoot);
......@@ -2841,31 +2841,31 @@ static void fill_treeview_sort_test(HWND hwnd)
/* root, two children, with two children each */
ins.hParent = TVI_ROOT;
ins.hInsertAfter = TVI_ROOT;
U(ins).item.mask = TVIF_TEXT;
U(ins).item.pszText = (char *)itemnames[i++];
ins.item.mask = TVIF_TEXT;
ins.item.pszText = (char *)itemnames[i++];
root = (HTREEITEM)SendMessageA(hwnd, TVM_INSERTITEMA, 0, (LPARAM)&ins);
ins.hParent = root;
ins.hInsertAfter = TVI_LAST;
U(ins).item.mask = TVIF_TEXT;
U(ins).item.pszText = (char *)itemnames[i++];
ins.item.mask = TVIF_TEXT;
ins.item.pszText = (char *)itemnames[i++];
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);
ins.hParent = children[0];
U(ins).item.pszText = (char *)itemnames[i++];
ins.item.pszText = (char *)itemnames[i++];
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);
ins.hParent = children[1];
U(ins).item.pszText = (char *)itemnames[i++];
ins.item.pszText = (char *)itemnames[i++];
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);
}
......@@ -2891,8 +2891,8 @@ static void test_TVM_SORTCHILDREN(void)
/* add only root, sort from it */
ins.hParent = TVI_ROOT;
ins.hInsertAfter = TVI_ROOT;
U(ins).item.mask = TVIF_TEXT;
U(ins).item.pszText = (char *)"root";
ins.item.mask = TVIF_TEXT;
ins.item.pszText = (char *)"root";
root = (HTREEITEM)SendMessageA(hwnd, TVM_INSERTITEMA, 0, (LPARAM)&ins);
ok(root != NULL, "Expected root node\n");
......@@ -2962,19 +2962,19 @@ static void test_TVM_SORTCHILDREN(void)
ins.hParent = TVI_ROOT;
ins.hInsertAfter = TVI_ROOT;
U(ins).item.mask = TVIF_TEXT;
U(ins).item.pszText = (char *)"root";
ins.item.mask = TVIF_TEXT;
ins.item.pszText = (char *)"root";
root = (HTREEITEM)SendMessageA(hwnd, TVM_INSERTITEMA, 0, (LPARAM)&ins);
ok(root != NULL, "Expected root node\n");
ins.hParent = root;
ins.hInsertAfter = TVI_LAST;
U(ins).item.pszText = (char *)"I1";
ins.item.pszText = (char *)"I1";
SendMessageA(hwnd, TVM_INSERTITEMA, 0, (LPARAM)&ins);
ins.hParent = root;
ins.hInsertAfter = TVI_LAST;
U(ins).item.pszText = (char *)"i1";
ins.item.pszText = (char *)"i1";
SendMessageA(hwnd, TVM_INSERTITEMA, 0, (LPARAM)&ins);
ret = SendMessageA(hwnd, TVM_SORTCHILDREN, TRUE, (LPARAM)root);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment