Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/user32/tests/listbox.c | 211 ++++++++++++++++++++++--------------------- 1 file changed, 106 insertions(+), 105 deletions(-)
diff --git a/dlls/user32/tests/listbox.c b/dlls/user32/tests/listbox.c index cb2551002d6..75acd4baddc 100644 --- a/dlls/user32/tests/listbox.c +++ b/dlls/user32/tests/listbox.c @@ -16,6 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#undef WINE_NO_LONG_TYPES /* temporary for migration */
#include <assert.h> #include <stdarg.h> @@ -128,7 +129,7 @@ keypress (HWND handle, WPARAM keycode, BYTE scancode, BOOL extended) }
#define listbox_field_ok(t, s, f, got) \ - ok (t.s.f==got.f, "style %#x, step " #s ", field " #f \ + ok (t.s.f==got.f, "style %#lx, step " #s ", field " #f \ ": expected %d, got %d\n", style, t.s.f, got.f)
#define listbox_todo_field_ok(t, s, f, got) \ @@ -223,7 +224,7 @@ static void check_item_height(void) ok (SendMessageA(hLB, WM_SETFONT, (WPARAM)font, 0) == 0, "Can't set font\n");
itemHeight = SendMessageA(hLB, LB_GETITEMHEIGHT, 0, 0); - ok (itemHeight == tm.tmHeight, "Item height wrong, got %d, expecting %d\n", itemHeight, tm.tmHeight); + ok (itemHeight == tm.tmHeight, "Item height wrong, got %d, expecting %ld\n", itemHeight, tm.tmHeight);
DestroyWindow (hLB);
@@ -249,7 +250,7 @@ static LRESULT WINAPI main_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARA DWORD style = GetWindowLongA(GetWindow(hwnd, GW_CHILD), GWL_STYLE); MEASUREITEMSTRUCT *mi = (void*)lparam;
- ok(wparam == mi->CtlID, "got wParam=%08lx, expected %08x\n", wparam, mi->CtlID); + ok(wparam == mi->CtlID, "got wParam=%08Ix, expected %08x\n", wparam, mi->CtlID); ok(mi->CtlType == ODT_LISTBOX, "mi->CtlType = %u\n", mi->CtlType); ok(mi->CtlID == 1, "mi->CtlID = %u\n", mi->CtlID); ok(mi->itemHeight, "mi->itemHeight = 0\n"); @@ -265,7 +266,7 @@ static LRESULT WINAPI main_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARA else { ok((void*)mi->itemData == strings[mi->itemID], - "mi->itemData = %08lx, expected %p\n", mi->itemData, strings[mi->itemID]); + "mi->itemData = %08Ix, expected %p\n", mi->itemData, strings[mi->itemID]); } break; } @@ -274,9 +275,9 @@ static LRESULT WINAPI main_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARA RECT rc_item, rc_client, rc_clip; DRAWITEMSTRUCT *dis = (DRAWITEMSTRUCT *)lparam;
- trace("%p WM_DRAWITEM %08lx %08lx\n", hwnd, wparam, lparam); + trace("%p WM_DRAWITEM %08Ix %08Ix\n", hwnd, wparam, lparam);
- ok(wparam == dis->CtlID, "got wParam=%08lx instead of %08x\n", + ok(wparam == dis->CtlID, "got wParam=%08Ix instead of %08x\n", wparam, dis->CtlID); ok(dis->CtlType == ODT_LISTBOX, "wrong CtlType %04x\n", dis->CtlType);
@@ -386,14 +387,14 @@ static void test_ownerdraw(void) SendMessageA(hLB, LB_GETITEMRECT, 0, (LPARAM)&rc); trace("item 0 rect %s\n", wine_dbgstr_rect(&rc)); ok(!IsRectEmpty(&rc), "empty item rect\n"); - ok(rc.top < 0, "rc.top is not negative (%d)\n", rc.top); + ok(rc.top < 0, "rc.top is not negative (%ld)\n", rc.top);
DestroyWindow(hLB);
/* Both FIXED and VARIABLE, FIXED should override VARIABLE. */ hLB = CreateWindowA("listbox", "TestList", LBS_OWNERDRAWFIXED | LBS_OWNERDRAWVARIABLE | styles[i], 0, 0, 100, 100, NULL, NULL, NULL, 0); - ok(hLB != NULL, "last error 0x%08x\n", GetLastError()); + ok(hLB != NULL, "last error 0x%08lx\n", GetLastError());
ok(GetWindowLongA(hLB, GWL_STYLE) & LBS_OWNERDRAWVARIABLE, "Unexpected window style.\n");
@@ -785,70 +786,70 @@ static void test_changing_selection_styles(void) for (k = 0; k < ARRAY_SIZE(selexpect_multi); k++) { ret = SendMessageA(listbox, LB_INSERTSTRING, -1, (LPARAM)"x"); - ok(ret == k, "%u: Unexpected return value %d, expected %d.\n", j, ret, k); + ok(ret == k, "%u: Unexpected return value %ld, expected %d.\n", j, ret, k); } ret = SendMessageA(listbox, LB_GETCOUNT, 0, 0); - ok(ret == ARRAY_SIZE(selexpect_multi), "%u: Unexpected count %d.\n", j, ret); + ok(ret == ARRAY_SIZE(selexpect_multi), "%u: Unexpected count %ld.\n", j, ret);
/* Select items with different methods */ ret = SendMessageA(listbox, LB_SETCURSEL, 2, 0); - ok(ret == setcursel_expect, "%u: Unexpected return value %d.\n", j, ret); + ok(ret == setcursel_expect, "%u: Unexpected return value %ld.\n", j, ret); ret = SendMessageA(listbox, LB_SELITEMRANGE, TRUE, MAKELPARAM(0, 0)); - ok(ret == selitemrange_expect, "%u: Unexpected return value %d.\n", j, ret); + ok(ret == selitemrange_expect, "%u: Unexpected return value %ld.\n", j, ret); ret = SendMessageA(listbox, LB_SELITEMRANGE, TRUE, MAKELPARAM(2, 2)); - ok(ret == selitemrange_expect, "%u: Unexpected return value %d.\n", j, ret); + ok(ret == selitemrange_expect, "%u: Unexpected return value %ld.\n", j, ret);
/* Verify that the proper items are selected */ for (k = 0; k < ARRAY_SIZE(selexpect_multi); k++) { ret = SendMessageA(listbox, LB_GETSEL, k, 0); - ok(ret == selexpect[k], "%u: Unexpected selection state %d, expected %d.\n", + ok(ret == selexpect[k], "%u: Unexpected selection state %ld, expected %ld.\n", j, ret, selexpect[k]); }
/* Now change the selection style */ style = GetWindowLongA(listbox, GWL_STYLE); ok((style & (LBS_MULTIPLESEL | LBS_EXTENDEDSEL)) == selstyles[j], - "%u: unexpected window styles %#x.\n", j, style); + "%u: unexpected window styles %#lx.\n", j, style); if (selstyles[j] & (LBS_MULTIPLESEL | LBS_EXTENDEDSEL)) style &= ~selstyles[j]; else style |= LBS_MULTIPLESEL | LBS_EXTENDEDSEL; SetWindowLongA(listbox, GWL_STYLE, style); style = GetWindowLongA(listbox, GWL_STYLE); - ok(!(style & selstyles[j]), "%u: unexpected window styles %#x.\n", j, style); + ok(!(style & selstyles[j]), "%u: unexpected window styles %#lx.\n", j, style);
/* Verify that the same items are selected */ ret = SendMessageA(listbox, LB_GETSELCOUNT, 0, 0); - ok(ret == getselcount_expect, "%u: expected %d from LB_GETSELCOUNT, got %d\n", + ok(ret == getselcount_expect, "%u: expected %ld from LB_GETSELCOUNT, got %ld\n", j, getselcount_expect, ret);
for (k = 0; k < ARRAY_SIZE(selexpect_multi); k++) { ret = SendMessageA(listbox, LB_GETSEL, k, 0); - ok(ret == selexpect[k], "%u: Unexpected selection state %d, expected %d.\n", + ok(ret == selexpect[k], "%u: Unexpected selection state %ld, expected %ld.\n", j, ret, selexpect[k]); }
/* Lastly see if we can still change the selection as before with old style */ if (setcursel_expect != LB_ERR) setcursel_expect = 0; ret = SendMessageA(listbox, LB_SETCURSEL, 0, 0); - ok(ret == setcursel_expect, "%u: Unexpected return value %d.\n", j, ret); + ok(ret == setcursel_expect, "%u: Unexpected return value %ld.\n", j, ret); ret = SendMessageA(listbox, LB_SELITEMRANGE, TRUE, MAKELPARAM(1, 1)); - ok(ret == selitemrange_expect, "%u: Unexpected return value %d.\n", j, ret); + ok(ret == selitemrange_expect, "%u: Unexpected return value %ld.\n", j, ret); ret = SendMessageA(listbox, LB_SELITEMRANGE, FALSE, MAKELPARAM(2, 2)); - ok(ret == selitemrange_expect, "%u: Unexpected return value %d.\n", j, ret); + ok(ret == selitemrange_expect, "%u: Unexpected return value %ld.\n", j, ret);
/* And verify the selections */ selexpect = (selstyles[j] & (LBS_MULTIPLESEL | LBS_EXTENDEDSEL)) ? selexpect_multi2 : selexpect_single2; ret = SendMessageA(listbox, LB_GETSELCOUNT, 0, 0); - ok(ret == getselcount_expect, "%u: expected %d from LB_GETSELCOUNT, got %d\n", + ok(ret == getselcount_expect, "%u: expected %ld from LB_GETSELCOUNT, got %ld\n", j, getselcount_expect, ret);
for (k = 0; k < ARRAY_SIZE(selexpect_multi); k++) { ret = SendMessageA(listbox, LB_GETSEL, k, 0); - ok(ret == selexpect[k], "%u: Unexpected selection state %d, expected %d.\n", + ok(ret == selexpect[k], "%u: Unexpected selection state %ld, expected %ld.\n", j, ret, selexpect[k]); }
@@ -872,13 +873,13 @@ static void test_itemfrompoint(void)
/* For an empty listbox win2k returns 0x1ffff, win98 returns 0x10000, nt4 returns 0xffffffff */ r = SendMessageA(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( /* x */ 30, /* y */ 30 )); - ok( r == 0x1ffff || r == 0x10000 || r == 0xffffffff, "ret %x\n", r ); + ok( r == 0x1ffff || r == 0x10000 || r == 0xffffffff, "ret %lx\n", r );
r = SendMessageA(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( 700, 30 )); - ok( r == 0x1ffff || r == 0x10000 || r == 0xffffffff, "ret %x\n", r ); + ok( r == 0x1ffff || r == 0x10000 || r == 0xffffffff, "ret %lx\n", r );
r = SendMessageA(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( 30, 300 )); - ok( r == 0x1ffff || r == 0x10000 || r == 0xffffffff, "ret %x\n", r ); + ok( r == 0x1ffff || r == 0x10000 || r == 0xffffffff, "ret %lx\n", r );
id = SendMessageA( hList, LB_ADDSTRING, 0, (LPARAM) "hi"); ok( id == 0, "item id wrong\n"); @@ -886,17 +887,17 @@ static void test_itemfrompoint(void) ok( id == 1, "item id wrong\n");
r = SendMessageA(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( /* x */ 30, /* y */ 30 )); - ok( r == 0x1, "ret %x\n", r ); + ok( r == 0x1, "ret %lx\n", r );
r = SendMessageA(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( /* x */ 30, /* y */ 601 )); ok( r == 0x10001 || broken(r == 1), /* nt4 */ - "ret %x\n", r ); + "ret %lx\n", r );
/* Resize control so that below assertions about sizes are valid */ r = SendMessageA( hList, LB_GETITEMRECT, 0, (LPARAM)&rc); - ok( r == 1, "ret %x\n", r); + ok( r == 1, "ret %lx\n", r); r = MoveWindow(hList, 1, 1, 600, (rc.bottom - rc.top + 1) * 9 / 2, TRUE); - ok( r != 0, "ret %x\n", r); + ok( r != 0, "ret %lx\n", r);
id = SendMessageA( hList, LB_ADDSTRING, 0, (LPARAM) "hi2"); ok( id == 2, "item id wrong\n"); @@ -916,31 +917,31 @@ static void test_itemfrompoint(void)
SendMessageA( hList, LB_SETTOPINDEX, 1, 0); r = SendMessageA( hList, LB_GETTOPINDEX, 0, 0); - ok( r == 1, "top %d\n", r); + ok( r == 1, "top %ld\n", r);
r = SendMessageA( hList, LB_GETITEMRECT, 5, (LPARAM)&rc); - ok( r == 1, "ret %x\n", r); + ok( r == 1, "ret %lx\n", r); r = SendMessageA( hList, LB_GETITEMRECT, 6, (LPARAM)&rc); - ok( r == 0, "ret %x\n", r); + ok( r == 0, "ret %lx\n", r);
r = SendMessageA( hList, LB_ITEMFROMPOINT, 0, MAKELPARAM(/* x */ 10, /* y */ 10) ); - ok( r == 1, "ret %x\n", r); + ok( r == 1, "ret %lx\n", r);
r = SendMessageA( hList, LB_ITEMFROMPOINT, 0, MAKELPARAM(1000, 10) ); ok( r == 0x10001 || broken(r == 1), /* nt4 */ - "ret %x\n", r ); + "ret %lx\n", r );
r = SendMessageA( hList, LB_ITEMFROMPOINT, 0, MAKELPARAM(10, -10) ); ok( r == 0x10001 || broken(r == 1), /* nt4 */ - "ret %x\n", r ); + "ret %lx\n", r );
r = SendMessageA( hList, LB_ITEMFROMPOINT, 0, MAKELPARAM(10, 100) ); ok( r == 0x10005 || broken(r == 5), /* nt4 */ - "item %x\n", r ); + "item %lx\n", r );
r = SendMessageA( hList, LB_ITEMFROMPOINT, 0, MAKELPARAM(10, 200) ); ok( r == 0x10005 || broken(r == 5), /* nt4 */ - "item %x\n", r ); + "item %lx\n", r );
DestroyWindow( hList ); } @@ -993,7 +994,7 @@ static void test_listbox_LB_DIR(void) ok(ret, "Failed to create test directory.\n");
file = CreateFileA( "wtest1.tmp.c", GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL ); - ok(file != INVALID_HANDLE_VALUE, "Error creating the test file: %d\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "Error creating the test file: %ld\n", GetLastError()); CloseHandle( file );
/* NOTE: for this test to succeed, there must be no subdirectories @@ -1017,7 +1018,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, wildcard); res = SendMessageA(hList, LB_DIR, 0, (LPARAM)pathBuffer); } - ok (res >= 0, "SendMessage(LB_DIR, 0, *) failed - 0x%08x\n", GetLastError()); + ok (res >= 0, "SendMessage(LB_DIR, 0, *) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox */ itemCount = SendMessageA(hList, LB_GETCOUNT, 0, 0); @@ -1044,7 +1045,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, "w*.c"); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, 0, (LPARAM)pathBuffer); - ok (res >= 0, "SendMessage(LB_DIR, 0, w*.c) failed - 0x%08x\n", GetLastError()); + ok (res >= 0, "SendMessage(LB_DIR, 0, w*.c) failed - 0x%08lx\n", GetLastError());
/* Path specification does NOT converted to uppercase */ ok (!strcmp(pathBuffer, "w*.c"), @@ -1072,7 +1073,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, wildcard); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DIRECTORY, (LPARAM)pathBuffer); - ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY, *) failed - 0x%08x\n", GetLastError()); + ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY, *) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. * All files plus "[..]" @@ -1101,7 +1102,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, "w*.c"); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DIRECTORY, (LPARAM)pathBuffer); - ok (res >= 0, "SendMessage(LB_DIR, DDL_DIRECTORY, w*.c) failed - 0x%08x\n", GetLastError()); + ok (res >= 0, "SendMessage(LB_DIR, DDL_DIRECTORY, w*.c) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. Since the parent directory does not * fit w*.c, there should be exactly the same number of items as without DDL_DIRECTORY @@ -1130,7 +1131,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, wildcard); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, (LPARAM)pathBuffer); - ok (res >= 0, "SendMessage(LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, *) failed - 0x%08x\n", GetLastError()); + ok (res >= 0, "SendMessage(LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, *) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. In particular, there should * be at least one element before, since the string "[-c-]" should @@ -1177,7 +1178,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, wildcard); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DRIVES, (LPARAM)pathBuffer); - ok (res > 0, "SendMessage(LB_DIR, DDL_DRIVES, *) failed - 0x%08x\n", GetLastError()); + ok (res > 0, "SendMessage(LB_DIR, DDL_DRIVES, *) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. In particular, there should * be at least one element before, since the string "[-c-]" should @@ -1205,7 +1206,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, "w*.c"); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DRIVES, (LPARAM)pathBuffer); - ok (res > 0, "SendMessage(LB_DIR, DDL_DRIVES, w*.c) failed - 0x%08x\n", GetLastError()); + ok (res > 0, "SendMessage(LB_DIR, DDL_DRIVES, w*.c) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. In particular, there should * be at least one element before, since the string "[-c-]" should @@ -1240,7 +1241,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, wildcard); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DIRECTORY|DDL_DRIVES, (LPARAM)pathBuffer); - ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, *) failed - 0x%08x\n", GetLastError()); + ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, *) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. In particular, there should * be exactly the number of plain files, plus the number of mapped drives. @@ -1280,7 +1281,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, "w*.c"); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DIRECTORY|DDL_DRIVES, (LPARAM)pathBuffer); - ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, w*.c) failed - 0x%08x\n", GetLastError()); + ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, w*.c) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. In particular, there should * be exactly the number of plain files, plus the number of mapped drives. @@ -1314,7 +1315,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, wildcard); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, (LPARAM)pathBuffer); - ok (res != -1, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err %u\n", GetLastError()); + ok (res != -1, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err %lu\n", GetLastError());
itemCount = SendMessageA(hList, LB_GETCOUNT, 0, 0); ok (itemCount == itemCount_allDirs, @@ -1356,7 +1357,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, wildcard); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, (LPARAM)pathBuffer); - ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c,) failed - 0x%08x\n", GetLastError()); + ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c,) failed - 0x%08lx\n", GetLastError());
/* There should be no plain files on the listbox */ itemCount = SendMessageA(hList, LB_GETCOUNT, 0, 0); @@ -1391,7 +1392,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, "w*.c"); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, (LPARAM)pathBuffer); - ok (res >= 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c,) failed - 0x%08x\n", GetLastError()); + ok (res >= 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c,) failed - 0x%08lx\n", GetLastError());
/* There should be no plain files on the listbox, and no [..], since it does not fit w*.c */ itemCount = SendMessageA(hList, LB_GETCOUNT, 0, 0); @@ -1497,7 +1498,7 @@ static void test_listbox_dlgdir(void) HANDLE file;
file = CreateFileA( "wtest1.tmp.c", GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL ); - ok(file != INVALID_HANDLE_VALUE, "Error creating the test file: %d\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "Error creating the test file: %ld\n", GetLastError()); CloseHandle( file );
/* NOTE: for this test to succeed, there must be no subdirectories @@ -1524,7 +1525,7 @@ static void test_listbox_dlgdir(void) */ strcpy(pathBuffer, "w*.c"); res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, 0); - ok (res == 1, "DlgDirList(*.c, 0) returned %d - expected 1 - 0x%08x\n", res, GetLastError()); + ok (res == 1, "DlgDirList(*.c, 0) returned %d - expected 1 - 0x%08lx\n", res, GetLastError());
/* Path specification gets converted to uppercase */ ok (!strcmp(pathBuffer, "W*.C"), @@ -1562,7 +1563,7 @@ static void test_listbox_dlgdir(void) strcpy(pathBuffer, "w*.c"); res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, DDL_DIRECTORY); - ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY) failed - 0x%08x\n", GetLastError()); + ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. In particular, there should * be exactly more elements than before, since the directories should @@ -1609,7 +1610,7 @@ static void test_listbox_dlgdir(void) strcpy(pathBuffer, "w*.c"); res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, DDL_DRIVES); - ok (res == 1, "DlgDirList(*.c, DDL_DRIVES) failed - 0x%08x\n", GetLastError()); + ok (res == 1, "DlgDirList(*.c, DDL_DRIVES) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. In particular, there should * be at least one element before, since the string "[-c-]" should @@ -1651,7 +1652,7 @@ static void test_listbox_dlgdir(void) strcpy(pathBuffer, "w*.c"); res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, DDL_DIRECTORY|DDL_DRIVES); - ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY|DDL_DRIVES) failed - 0x%08x\n", GetLastError()); + ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY|DDL_DRIVES) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. In particular, there should * be exactly the number of plain files, plus the number of mapped drives, @@ -1698,7 +1699,7 @@ static void test_listbox_dlgdir(void) strcpy(pathBuffer, "w*.c"); res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, DDL_DIRECTORY|DDL_EXCLUSIVE); - ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY|DDL_EXCLUSIVE) failed - 0x%08x\n", GetLastError()); + ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY|DDL_EXCLUSIVE) failed - 0x%08lx\n", GetLastError());
/* There should be exactly one element: "[..]" */ itemCount = SendMessageA(g_listBox, LB_GETCOUNT, 0, 0); @@ -1727,7 +1728,7 @@ static void test_listbox_dlgdir(void) strcpy(pathBuffer, "w*.c"); res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE); - ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE) failed - 0x%08x\n", GetLastError()); + ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE) failed - 0x%08lx\n", GetLastError());
/* There should be no plain files on the listbox */ itemCount = SendMessageA(g_listBox, LB_GETCOUNT, 0, 0); @@ -1762,14 +1763,14 @@ static void test_listbox_dlgdir(void) strcpy(pathBuffer, "*"); res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, DDL_DIRECTORY|DDL_DRIVES); - ok (res != 0, "DlgDirList(*, DDL_DIRECTORY|DDL_DRIVES) failed - 0x%08x\n", GetLastError()); + ok (res != 0, "DlgDirList(*, DDL_DIRECTORY|DDL_DRIVES) failed - 0x%08lx\n", GetLastError());
SendMessageA(g_listBox, LB_SETCURSEL, -1, 0); /* Unselect any current selection */ memset(pathBuffer, 0, MAX_PATH); SetLastError(0xdeadbeef); res = DlgDirSelectExA(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with no selection modified last error code from 0xdeadbeef to 0x%08x\n", + "DlgDirSelectEx() with no selection modified last error code from 0xdeadbeef to 0x%08lx\n", GetLastError()); ok (res == 0, "DlgDirSelectEx() with no selection returned %d, expected 0\n", res); /* WinXP-SP2 leaves pathBuffer untouched, but Win98 fills it with garbage. */ @@ -1791,7 +1792,7 @@ static void test_listbox_dlgdir(void) SetLastError(0xdeadbeef); res = DlgDirSelectExA(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08x\n", + "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08lx\n", i, GetLastError()); ok(res == 1, "DlgDirSelectEx() thinks %s (%s) is not a drive/directory!\n", itemBuffer, pathBuffer);
@@ -1803,7 +1804,7 @@ static void test_listbox_dlgdir(void) SetLastError(0xdeadbeef); res = DlgDirSelectExA(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08x\n", + "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08lx\n", i, GetLastError()); ok(res == 1, "DlgDirSelectEx() thinks %s (%s) is not a drive/directory!\n", itemBuffer, pathBuffer);
@@ -1820,7 +1821,7 @@ static void test_listbox_dlgdir(void) SetLastError(0xdeadbeef); res = DlgDirSelectExA(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08x\n", + "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08lx\n", i, GetLastError()); ok(res == 0, "DlgDirSelectEx() thinks %s (%s) is a drive/directory!\n", itemBuffer, pathBuffer);
@@ -1854,7 +1855,7 @@ static void test_listbox_dlgdir(void) SetLastError(0xdeadbeef); res = DlgDirSelectExA(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08x\n", + "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08lx\n", i, GetLastError()); ok(res == 1, "DlgDirSelectEx() thinks %s (%s) is not a drive/directory!\n", itemBuffer, pathBuffer);
@@ -1866,7 +1867,7 @@ static void test_listbox_dlgdir(void) SetLastError(0xdeadbeef); res = DlgDirSelectExA(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08x\n", + "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08lx\n", i, GetLastError()); ok(res == 1, "DlgDirSelectEx() thinks %s (%s) is not a drive/directory!\n", itemBuffer, pathBuffer);
@@ -1883,7 +1884,7 @@ static void test_listbox_dlgdir(void) SetLastError(0xdeadbeef); res = DlgDirSelectExA(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08x\n", + "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08lx\n", i, GetLastError()); ok(res == 0, "DlgDirSelectEx() thinks %s (%s) is a drive/directory!\n", itemBuffer, pathBuffer);
@@ -1915,7 +1916,7 @@ static void test_listbox_dlgdir(void) res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, 0, DDL_DIRECTORY | DDL_EXCLUSIVE); ok(!res, "DlgDirList should have failed with 0 but %d was returned\n", res); ok(GetLastError() == ERROR_NO_WILDCARD_CHARACTERS, - "GetLastError should return 0x589, got 0x%X\n",GetLastError()); + "GetLastError should return 0x589, got 0x%lX\n",GetLastError());
DestroyWindow(hWnd); } @@ -1940,9 +1941,9 @@ static void test_set_count( void ) ok( IsRectEmpty( &r ), "got non-empty rect\n");
ret = SendMessageA( listbox, LB_SETCOUNT, 100, 0 ); - ok( ret == 0, "got %d\n", ret ); + ok( ret == 0, "got %ld\n", ret ); ret = SendMessageA( listbox, LB_GETCOUNT, 0, 0 ); - ok( ret == 100, "got %d\n", ret ); + ok( ret == 100, "got %ld\n", ret );
GetUpdateRect( listbox, &r, TRUE ); ok( !IsRectEmpty( &r ), "got empty rect\n"); @@ -1952,15 +1953,15 @@ static void test_set_count( void ) ok( IsRectEmpty( &r ), "got non-empty rect\n");
ret = SendMessageA( listbox, LB_SETCOUNT, 99, 0 ); - ok( ret == 0, "got %d\n", ret ); + ok( ret == 0, "got %ld\n", ret );
GetUpdateRect( listbox, &r, TRUE ); ok( !IsRectEmpty( &r ), "got empty rect\n");
ret = SendMessageA( listbox, LB_SETCOUNT, -5, 0 ); - ok( ret == 0, "got %d\n", ret ); + ok( ret == 0, "got %ld\n", ret ); ret = SendMessageA( listbox, LB_GETCOUNT, 0, 0 ); - ok( ret == -5, "got %d\n", ret ); + ok( ret == -5, "got %ld\n", ret );
DestroyWindow( listbox );
@@ -1970,8 +1971,8 @@ static void test_set_count( void )
SetLastError( 0xdeadbeef ); ret = SendMessageA( listbox, LB_SETCOUNT, 100, 0 ); - ok( ret == LB_ERR, "expected %d, got %d\n", LB_ERR, ret ); - ok( GetLastError() == ERROR_SETCOUNT_ON_BAD_LB, "Unexpected error %d.\n", GetLastError() ); + ok( ret == LB_ERR, "expected %d, got %ld\n", LB_ERR, ret ); + ok( GetLastError() == ERROR_SETCOUNT_ON_BAD_LB, "Unexpected error %ld.\n", GetLastError() );
DestroyWindow( listbox ); } @@ -2014,7 +2015,7 @@ static void test_GetListBoxInfo(void)
lb_getlistboxinfo = 0; ret = pGetListBoxInfo(listbox); - ok(ret > 0, "got %d\n", ret); + ok(ret > 0, "got %ld\n", ret); todo_wine ok(lb_getlistboxinfo == 0, "got %d\n", lb_getlistboxinfo);
@@ -2040,45 +2041,45 @@ static void test_init_storage( void ) 0, 0, 100, 100, parent, (HMENU)1, NULL, 0);
items_size = SendMessageA(listbox, LB_INITSTORAGE, 100, 0); - ok(items_size >= 100, "expected at least 100, got %d\n", items_size); + ok(items_size >= 100, "expected at least 100, got %ld\n", items_size);
ret = SendMessageA(listbox, LB_INITSTORAGE, 0, 0); - ok(ret == items_size, "expected %d, got %d\n", items_size, ret); + ok(ret == items_size, "expected %ld, got %ld\n", items_size, ret);
/* it doesn't grow since the space was already reserved */ ret = SendMessageA(listbox, LB_INITSTORAGE, items_size, 0); - ok(ret == items_size, "expected %d, got %d\n", items_size, ret); + ok(ret == items_size, "expected %ld, got %ld\n", items_size, ret);
/* it doesn't shrink the reserved space */ ret = SendMessageA(listbox, LB_INITSTORAGE, 42, 0); - ok(ret == items_size, "expected %d, got %d\n", items_size, ret); + ok(ret == items_size, "expected %ld, got %ld\n", items_size, ret);
/* now populate almost all of it so it's not reserved anymore */ if (styles[i] & LBS_NODATA) { ret = SendMessageA(listbox, LB_SETCOUNT, items_size - 1, 0); - ok(ret == 0, "unexpected return value %d\n", ret); + ok(ret == 0, "unexpected return value %ld\n", ret); } else { for (j = 0; j < items_size - 1; j++) { ret = SendMessageA(listbox, LB_INSERTSTRING, -1, (LPARAM)""); - ok(ret == j, "expected %d, got %d\n", j, ret); + ok(ret == j, "expected %d, got %ld\n", j, ret); } }
/* we still have one more reserved slot, so it doesn't grow yet */ ret = SendMessageA(listbox, LB_INITSTORAGE, 1, 0); - ok(ret == items_size, "expected %d, got %d\n", items_size, ret); + ok(ret == items_size, "expected %ld, got %ld\n", items_size, ret);
/* fill the slot and check again, it should grow this time */ ret = SendMessageA(listbox, LB_INSERTSTRING, -1, (LPARAM)""); - ok(ret == items_size - 1, "expected %d, got %d\n", items_size - 1, ret); + ok(ret == items_size - 1, "expected %ld, got %ld\n", items_size - 1, ret); ret = SendMessageA(listbox, LB_INITSTORAGE, 0, 0); - ok(ret == items_size, "expected %d, got %d\n", items_size, ret); + ok(ret == items_size, "expected %ld, got %ld\n", items_size, ret); ret = SendMessageA(listbox, LB_INITSTORAGE, 1, 0); - ok(ret > items_size, "expected it to grow past %d, got %d\n", items_size, ret); + ok(ret > items_size, "expected it to grow past %ld, got %ld\n", items_size, ret);
DestroyWindow(listbox); } @@ -2120,7 +2121,7 @@ static void test_extents(void) listbox = create_listbox(WS_CHILD | WS_VISIBLE, parent);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 0, "Got wrong initial horizontal extent: %u\n", res); + ok(res == 0, "Got wrong initial horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2135,7 +2136,7 @@ static void test_extents(void) SendMessageA(listbox, LB_SETHORIZONTALEXTENT, 64, 0);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 64, "Got wrong horizontal extent: %u\n", res); + ok(res == 64, "Got wrong horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2150,7 +2151,7 @@ static void test_extents(void) SendMessageA(listbox, LB_SETHORIZONTALEXTENT, 184, 0);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 184, "Got wrong horizontal extent: %u\n", res); + ok(res == 184, "Got wrong horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2167,7 +2168,7 @@ static void test_extents(void) listbox = create_listbox(WS_CHILD | WS_VISIBLE | WS_HSCROLL, parent);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 0, "Got wrong initial horizontal extent: %u\n", res); + ok(res == 0, "Got wrong initial horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2182,7 +2183,7 @@ static void test_extents(void) SendMessageA(listbox, LB_SETHORIZONTALEXTENT, 64, 0);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 64, "Got wrong horizontal extent: %u\n", res); + ok(res == 64, "Got wrong horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2197,7 +2198,7 @@ static void test_extents(void) SendMessageA(listbox, LB_SETHORIZONTALEXTENT, 184, 0);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 184, "Got wrong horizontal extent: %u\n", res); + ok(res == 184, "Got wrong horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2211,7 +2212,7 @@ static void test_extents(void) SendMessageA(listbox, LB_SETHORIZONTALEXTENT, 0, 0);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 0, "Got wrong horizontal extent: %u\n", res); + ok(res == 0, "Got wrong horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2228,7 +2229,7 @@ static void test_extents(void) listbox = create_listbox(WS_CHILD | WS_VISIBLE | WS_HSCROLL | LBS_DISABLENOSCROLL, parent);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 0, "Got wrong initial horizontal extent: %u\n", res); + ok(res == 0, "Got wrong initial horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2243,7 +2244,7 @@ static void test_extents(void) SendMessageA(listbox, LB_SETHORIZONTALEXTENT, 64, 0);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 64, "Got wrong horizontal extent: %u\n", res); + ok(res == 64, "Got wrong horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2258,7 +2259,7 @@ static void test_extents(void) SendMessageA(listbox, LB_SETHORIZONTALEXTENT, 184, 0);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 184, "Got wrong horizontal extent: %u\n", res); + ok(res == 184, "Got wrong horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2272,7 +2273,7 @@ static void test_extents(void) SendMessageA(listbox, LB_SETHORIZONTALEXTENT, 0, 0);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 0, "Got wrong horizontal extent: %u\n", res); + ok(res == 0, "Got wrong horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2297,14 +2298,14 @@ static void test_WM_MEASUREITEM(void) listbox = create_listbox(WS_CHILD | LBS_OWNERDRAWVARIABLE, parent);
data = SendMessageA(listbox, LB_GETITEMDATA, 0, 0); - ok(data == (LRESULT)strings[0], "data = %08lx, expected %p\n", data, strings[0]); + ok(data == (LRESULT)strings[0], "data = %08Ix, expected %p\n", data, strings[0]); DestroyWindow(parent);
parent = create_parent(); listbox = create_listbox(WS_CHILD | LBS_OWNERDRAWVARIABLE | LBS_HASSTRINGS, parent);
data = SendMessageA(listbox, LB_GETITEMDATA, 0, 0); - ok(!data, "data = %08lx\n", data); + ok(!data, "data = %08Ix\n", data); DestroyWindow(parent); }
@@ -2375,27 +2376,27 @@ static void test_LBS_NODATA(void) SetLastError(0xdeadbeef); ret = SendMessageA(listbox, LB_FINDSTRING, 1, 0); ok(ret == LB_ERR, "Unexpected return value %d.\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should return 0x57, got 0x%X\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should return 0x57, got 0x%lX\n", GetLastError()); SetLastError(0xdeadbeef); ret = SendMessageA(listbox, LB_FINDSTRING, 1, 42); ok(ret == LB_ERR, "Unexpected return value %d.\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should return 0x57, got 0x%X\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should return 0x57, got 0x%lX\n", GetLastError()); SetLastError(0xdeadbeef); ret = SendMessageA(listbox, LB_FINDSTRINGEXACT, 1, 0); ok(ret == LB_ERR, "Unexpected return value %d.\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should return 0x57, got 0x%X\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should return 0x57, got 0x%lX\n", GetLastError()); SetLastError(0xdeadbeef); ret = SendMessageA(listbox, LB_FINDSTRINGEXACT, 1, 42); ok(ret == LB_ERR, "Unexpected return value %d.\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should return 0x57, got 0x%X\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should return 0x57, got 0x%lX\n", GetLastError()); SetLastError(0xdeadbeef); ret = SendMessageA(listbox, LB_SELECTSTRING, 1, 0); ok(ret == LB_ERR, "Unexpected return value %d.\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should return 0x57, got 0x%X\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should return 0x57, got 0x%lX\n", GetLastError()); SetLastError(0xdeadbeef); ret = SendMessageA(listbox, LB_SELECTSTRING, 1, 42); ok(ret == LB_ERR, "Unexpected return value %d.\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should return 0x57, got 0x%X\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should return 0x57, got 0x%lX\n", GetLastError());
DestroyWindow(listbox);
@@ -2412,7 +2413,7 @@ static void test_LBS_NODATA(void) ok(listbox != NULL, "Failed to create a listbox.\n");
style = GetWindowLongA(listbox, GWL_STYLE); - ok((style & invalid_styles[i]) == invalid_styles[i], "%u: unexpected window styles %#x.\n", i, style); + ok((style & invalid_styles[i]) == invalid_styles[i], "%u: unexpected window styles %#lx.\n", i, style); ret = SendMessageA(listbox, LB_SETCOUNT, 100, 0); ok(ret == LB_ERR, "%u: unexpected return value %d.\n", i, ret); DestroyWindow(listbox);