33#define WAIT Sleep (1000)
34#define REDRAW RedrawWindow (handle, NULL, 0, RDW_UPDATENOW)
44 "Fourth added which is very long because at some time we only had a 256 byte character buffer and that was overflowing in one of those applications that had a common dialog file open box and tried to add a 300 characters long custom filter string which of course the code did not like and crashed. Just make sure this string is longer than 256 characters."
130#define listbox_field_ok(t, s, f, got) \
131 ok (t.s.f==got.f, "style %#lx, step " #s ", field " #f \
132 ": expected %d, got %d\n", style, t.s.f, got.f)
134#define listbox_todo_field_ok(t, s, f, got) \
135 todo_wine_if (t.s##_todo.f) { listbox_field_ok(t, s, f, got); }
137#define listbox_ok(t, s, got) \
138 listbox_todo_field_ok(t, s, selected, got); \
139 listbox_todo_field_ok(t, s, anchor, got); \
140 listbox_todo_field_ok(t, s, caret, got); \
141 listbox_todo_field_ok(t, s, selcount, got)
187 ok(resA == resW,
"Unexpected text length.\n");
197 ok((
res==4),
"Expected 4 items, got %d\n",
res);
203 ok((
res==4),
"Expected 4 items, got %d\n",
res);
226 ok (itemHeight ==
tm.tmHeight,
"Item height wrong, got %d, expecting %ld\n", itemHeight,
tm.tmHeight);
233 ok(itemHeight ==
tm.tmHeight,
"itemHeight %d\n", itemHeight);
235 ok(itemHeight ==
tm.tmHeight,
"itemHeight %d\n", itemHeight);
237 ok(itemHeight ==
tm.tmHeight,
"itemHeight %d\n", itemHeight);
254 ok(
mi->CtlID == 1,
"mi->CtlID = %u\n",
mi->CtlID);
255 ok(
mi->itemHeight,
"mi->itemHeight = 0\n");
268 "mi->itemData = %08Ix, expected %p\n",
mi->itemData,
strings[
mi->itemID]);
274 RECT rc_item, rc_client, rc_clip;
279 ok(
wparam == dis->
CtlID,
"got wParam=%08Ix instead of %08x\n",
288 "client rect of the listbox should be equal to the clip box,"
289 "or the clip box should be empty\n");
342 static const DWORD styles[] =
347 static const struct {
384 ok(
ret == 1,
"wrong top index %d\n",
ret);
389 ok(rc.top < 0,
"rc.top is not negative (%ld)\n", rc.top);
401 ok(
ret == 0,
"Unexpected return value %d.\n",
ret);
403 ok(
ret == 1,
"Unexpected return value %d.\n",
ret);
409 ok(
ret == 13,
"Unexpected item height %d.\n",
ret);
415 ok(
ret == 42,
"Unexpected item height %d.\n",
ret);
418 ok(
ret == 42,
"Unexpected item height %d.\n",
ret);
435 ok(
ret > 0,
"expected > 0, got %d\n",
ret);
437 ok(!
ret,
"expected 0, got %d\n",
ret);
441 ok(
ret,
"RedrawWindow failed\n");
449 ok(
ret,
"RedrawWindow failed\n");
459#define listbox_test_query(exp, got) \
460 ok(exp.selected == got.selected, "expected selected %d, got %d\n", exp.selected, got.selected); \
461 ok(exp.anchor == got.anchor, "expected anchor %d, got %d\n", exp.anchor, got.anchor); \
462 ok(exp.caret == got.caret, "expected caret %d, got %d\n", exp.caret, got.caret); \
463 ok(exp.selcount == got.selcount, "expected selcount %d, got %d\n", exp.selcount, got.selcount);
475 trace(
"testing LB_SELITEMRANGE\n");
484 ok(
ret ==
LB_OKAY,
"LB_SELITEMRANGE returned %d instead of LB_OKAY\n",
ret);
493 ok(
ret ==
LB_OKAY,
"LB_SELITEMRANGE returned %d instead of LB_OKAY\n",
ret);
502 ok(
ret ==
LB_OKAY,
"LB_SELITEMRANGE returned %d instead of LB_OKAY\n",
ret);
511 ok(
ret ==
LB_OKAY,
"LB_SELITEMRANGE returned %d instead of LB_OKAY\n",
ret);
520 ok(
ret ==
LB_OKAY,
"LB_SELITEMRANGE returned %d instead of LB_OKAY\n",
ret);
529 ok(
ret ==
LB_OKAY,
"LB_SELITEMRANGE returned %d instead of LB_OKAY\n",
ret);
538 ok(
ret ==
LB_OKAY,
"LB_SELITEMRANGE returned %d instead of LB_OKAY\n",
ret);
550 trace(
"testing LB_SETCURSEL\n");
561 ok(
ret == -1,
"Unexpected anchor index %d.\n",
ret);
564 ok(
ret == 2,
"LB_SETCURSEL returned %d instead of 2\n",
ret);
566 ok(
ret == 0,
"expected vscroll 0, got %d\n",
ret);
569 ok(
ret == -1,
"Unexpected anchor index %d.\n",
ret);
572 ok(
ret == 3,
"LB_SETCURSEL returned %d instead of 3\n",
ret);
574 ok(
ret == 1,
"expected vscroll 1, got %d\n",
ret);
577 ok(
ret == -1,
"Unexpected anchor index %d.\n",
ret);
582 ok(hLB !=
NULL,
"Failed to create ListBox window.\n");
585 ok(
ret == 1,
"Unexpected return value %d.\n",
ret);
588 ok(
ret == -1,
"Unexpected anchor index %d.\n",
ret);
594 ok(hLB !=
NULL,
"Failed to create ListBox window.\n");
597 ok(
ret == -1,
"Unexpected anchor index %d.\n",
ret);
600 ok(
ret == -1,
"Unexpected return value %d.\n",
ret);
603 ok(
ret == -1,
"Unexpected anchor index %d.\n",
ret);
609 ok(hLB !=
NULL,
"Failed to create ListBox window.\n");
612 ok(
ret == -1,
"Unexpected anchor index %d.\n",
ret);
615 ok(
ret == -1,
"Unexpected return value %d.\n",
ret);
618 ok(
ret == -1,
"Unexpected anchor index %d.\n",
ret);
630 ok(
list !=
NULL,
"Failed to create ListBox window.\n");
633 ok(
ret == -1,
"Unexpected anchor index %d.\n",
ret);
635 ok(
ret == 0,
"Unexpected caret index %d.\n",
ret);
638 ok(
ret == 0,
"Unexpected return value %d.\n",
ret);
640 ok(
ret == 0,
"Unexpected anchor index %d.\n",
ret);
642 ok(
ret == 0,
"Unexpected caret index %d.\n",
ret);
645 ok(
ret == 0,
"Unexpected return value %d.\n",
ret);
647 ok(
ret == 1,
"Unexpected anchor index %d.\n",
ret);
649 ok(
ret == 1,
"Unexpected caret index %d.\n",
ret);
652 ok(
ret == 0,
"Unexpected return value %d.\n",
ret);
654 ok(
ret == 1,
"Unexpected anchor index %d.\n",
ret);
656 ok(
ret == 1,
"Unexpected caret index %d.\n",
ret);
662 ok(
list !=
NULL,
"Failed to create ListBox window.\n");
665 ok(
ret == -1,
"Unexpected anchor index %d.\n",
ret);
667 ok(
ret == 0,
"Unexpected caret index %d.\n",
ret);
670 ok(
ret == 0,
"Unexpected return value %d.\n",
ret);
672 ok(
ret == 0,
"Unexpected anchor index %d.\n",
ret);
674 ok(
ret == 0,
"Unexpected caret index %d.\n",
ret);
677 ok(
ret == 0,
"Unexpected return value %d.\n",
ret);
679 ok(
ret == 1,
"Unexpected anchor index %d.\n",
ret);
681 ok(
ret == 1,
"Unexpected caret index %d.\n",
ret);
684 ok(
ret == 0,
"Unexpected return value %d.\n",
ret);
686 ok(
ret == 1,
"Unexpected anchor index %d.\n",
ret);
688 ok(
ret == 1,
"Unexpected caret index %d.\n",
ret);
703 ok(
id == 0,
"item id wrong\n");
706 ok(
r == 0,
"send message failed\n");
709 ok(
r == 20,
"height wrong\n");
712 ok(
r == -1,
"send message failed\n");
715 ok(
r == 20,
"height wrong\n");
718 ok(
r == -1,
"send message failed\n");
721 ok(
r == 20,
"height wrong\n");
724 ok(
r == 0,
"send message failed\n");
727 ok(
r == 0xff,
"height wrong\n");
734 static const DWORD styles[] =
739 static const DWORD selstyles[] =
746 static const LONG selexpect_single[] = { 0, 0, 1 };
747 static const LONG selexpect_single2[] = { 1, 0, 0 };
748 static const LONG selexpect_multi[] = { 1, 0, 1 };
749 static const LONG selexpect_multi2[] = { 1, 1, 0 };
757 ok(
parent !=
NULL,
"Failed to create parent window.\n");
763 LONG setcursel_expect, selitemrange_expect, getselcount_expect;
764 const LONG *selexpect;
768 ok(listbox !=
NULL,
"%u: Failed to create ListBox window.\n",
j);
772 setcursel_expect =
LB_ERR;
774 getselcount_expect = 2;
775 selexpect = selexpect_multi;
779 setcursel_expect = 2;
780 selitemrange_expect =
LB_ERR;
781 getselcount_expect =
LB_ERR;
782 selexpect = selexpect_single;
788 ok(
ret ==
k,
"%u: Unexpected return value %ld, expected %d.\n",
j,
ret,
k);
795 ok(
ret == setcursel_expect,
"%u: Unexpected return value %ld.\n",
j,
ret);
797 ok(
ret == selitemrange_expect,
"%u: Unexpected return value %ld.\n",
j,
ret);
799 ok(
ret == selitemrange_expect,
"%u: Unexpected return value %ld.\n",
j,
ret);
805 ok(
ret == selexpect[
k],
"%u: Unexpected selection state %ld, expected %ld.\n",
806 j,
ret, selexpect[
k]);
812 "%u: unexpected window styles %#lx.\n",
j,
style);
819 ok(!(
style & selstyles[
j]),
"%u: unexpected window styles %#lx.\n",
j,
style);
823 ok(
ret == getselcount_expect,
"%u: expected %ld from LB_GETSELCOUNT, got %ld\n",
824 j, getselcount_expect,
ret);
829 ok(
ret == selexpect[
k],
"%u: Unexpected selection state %ld, expected %ld.\n",
830 j,
ret, selexpect[
k]);
834 if (setcursel_expect !=
LB_ERR) setcursel_expect = 0;
836 ok(
ret == setcursel_expect,
"%u: Unexpected return value %ld.\n",
j,
ret);
838 ok(
ret == selitemrange_expect,
"%u: Unexpected return value %ld.\n",
j,
ret);
840 ok(
ret == selitemrange_expect,
"%u: Unexpected return value %ld.\n",
j,
ret);
845 ok(
ret == getselcount_expect,
"%u: expected %ld from LB_GETSELCOUNT, got %ld\n",
846 j, getselcount_expect,
ret);
851 ok(
ret == selexpect[
k],
"%u: Unexpected selection state %ld, expected %ld.\n",
852 j,
ret, selexpect[
k]);
875 ok(
r == 0x1ffff ||
r == 0x10000 ||
r == 0xffffffff,
"ret %lx\n",
r );
878 ok(
r == 0x1ffff ||
r == 0x10000 ||
r == 0xffffffff,
"ret %lx\n",
r );
881 ok(
r == 0x1ffff ||
r == 0x10000 ||
r == 0xffffffff,
"ret %lx\n",
r );
884 ok(
id == 0,
"item id wrong\n");
886 ok(
id == 1,
"item id wrong\n");
889 ok(
r == 0x1,
"ret %lx\n",
r );
897 ok(
r == 1,
"ret %lx\n",
r);
899 ok(
r != 0,
"ret %lx\n",
r);
902 ok(
id == 2,
"item id wrong\n");
904 ok(
id == 3,
"item id wrong\n");
906 ok(
id == 4,
"item id wrong\n");
908 ok(
id == 5,
"item id wrong\n");
910 ok(
id == 6,
"item id wrong\n");
912 ok(
id == 7,
"item id wrong\n");
919 ok(
r == 1,
"top %ld\n",
r);
922 ok(
r == 1,
"ret %lx\n",
r);
924 ok(
r == 0,
"ret %lx\n",
r);
927 ok(
r == 1,
"ret %lx\n",
r);
958 ok(
id == 0,
"item id wrong\n");
961 ok(
r ==
TRUE,
"LB_SETITEMDATA returned %d instead of TRUE\n",
r);
964 ok(
r == 20,
"get item data failed\n");
974 int itemCount_justFiles;
975 int itemCount_justDrives;
976 int itemCount_allFiles;
977 int itemCount_allDirs;
982 const char *wildcard =
"*";
990 ok(
ret,
"Failed to set current directory.\n");
993 ok(
ret,
"Failed to create test directory.\n");
1024 ok (itemCount > 0,
"SendMessage(LB_DIR) did NOT fill the listbox!\n");
1025 itemCount_allFiles = itemCount;
1026 ok(
res + 1 == itemCount,
1027 "SendMessage(LB_DIR, 0, *) returned incorrect index (expected %d got %d)!\n",
1028 itemCount - 1,
res);
1038 ok (itemCount == 0,
"SendMessage(LB_DIR) DID fill the listbox!\n");
1047 ok (
res >= 0,
"SendMessage(LB_DIR, 0, w*.c) failed - 0x%08lx\n",
GetLastError());
1051 "expected no change to pathBuffer, got %s\n",
pathBuffer);
1055 ok (itemCount > 0,
"SendMessage(LB_DIR) did NOT fill the listbox!\n");
1056 itemCount_justFiles = itemCount;
1057 ok(
res + 1 == itemCount,
1058 "SendMessage(LB_DIR, 0, w*.c) returned incorrect index (expected %d got %d)!\n",
1059 itemCount - 1,
res);
1062 for (
i = 0;
i < itemCount;
i++) {
1067 (*(
p-1) ==
'c' || *(
p-1) ==
'C') &&
1068 (*(
p-2) ==
'.')),
"Element %d (%s) does not fit requested w*.c\n",
i,
pathBuffer);
1075 ok (
res > 0,
"SendMessage(LB_DIR, DDL_DIRECTORY, *) failed - 0x%08lx\n",
GetLastError());
1081 itemCount_allDirs = itemCount - itemCount_allFiles;
1082 ok (itemCount > itemCount_allFiles,
1083 "SendMessage(LB_DIR, DDL_DIRECTORY, *) filled with %d entries, expected > %d\n",
1084 itemCount, itemCount_allFiles);
1085 ok(
res + 1 == itemCount,
1086 "SendMessage(LB_DIR, DDL_DIRECTORY, *) returned incorrect index (expected %d got %d)!\n",
1087 itemCount - 1,
res);
1093 ok (
res == -1,
"SendMessage(LB_DIR, DDL_DIRECTORY, %s) returned %d, expected -1\n",
BAD_EXTENSION,
res);
1097 ok (itemCount == 0,
"SendMessage(LB_DIR) DID fill the listbox!\n");
1104 ok (
res >= 0,
"SendMessage(LB_DIR, DDL_DIRECTORY, w*.c) failed - 0x%08lx\n",
GetLastError());
1110 ok (itemCount == itemCount_justFiles,
1111 "SendMessage(LB_DIR, DDL_DIRECTORY, w*.c) filled with %d entries, expected %d\n",
1112 itemCount, itemCount_justFiles);
1113 ok(
res + 1 == itemCount,
1114 "SendMessage(LB_DIR, DDL_DIRECTORY, w*.c) returned incorrect index (expected %d got %d)!\n",
1115 itemCount - 1,
res);
1118 for (
i = 0;
i < itemCount;
i++) {
1124 (*(
p-1) ==
'c' || *(
p-1) ==
'C') &&
1125 (*(
p-2) ==
'.')),
"Element %d (%s) does not fit requested w*.c\n",
i,
pathBuffer);
1133 ok (
res >= 0,
"SendMessage(LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, *) failed - 0x%08lx\n",
GetLastError());
1142 "SendMessage(LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, *) filled with %d entries, expected at least %d\n",
1144 itemCount_justDrives = itemCount;
1145 ok(
res + 1 == itemCount,
"SendMessage(LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, *) returned incorrect index!\n");
1148 for (
i = 0;
i < itemCount;
i++) {
1154 ok( driveletter >=
'a' && driveletter <=
'z',
"Drive letter not in range a..z, got ascii %d\n", driveletter);
1155 if (!(driveletter >=
'a' && driveletter <=
'z')) {
1158 itemCount_justDrives--;
1166 ok (
res == itemCount_justDrives -1,
"SendMessage(LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, %s) returned %d, expected %d\n",
1170 ok (itemCount == itemCount_justDrives,
"SendMessage(LB_DIR) returned %d expected %d\n",
1171 itemCount, itemCount_justDrives);
1173 trace(
"Files with w*.c: %d Mapped drives: %d Directories: 1\n",
1174 itemCount_justFiles, itemCount_justDrives);
1180 ok (
res > 0,
"SendMessage(LB_DIR, DDL_DRIVES, *) failed - 0x%08lx\n",
GetLastError());
1188 ok (itemCount == itemCount_justDrives + itemCount_allFiles,
1189 "SendMessage(LB_DIR, DDL_DRIVES, *) filled with %d entries, expected %d\n",
1190 itemCount, itemCount_justDrives + itemCount_allFiles);
1191 ok(
res + 1 == itemCount,
"SendMessage(LB_DIR, DDL_DRIVES, *) returned incorrect index!\n");
1197 ok (
res == itemCount_justDrives -1,
"SendMessage(LB_DIR, DDL_DRIVES, %s) returned %d, expected %d\n",
1201 ok (itemCount ==
res + 1,
"SendMessage(LB_DIR) returned %d expected %d\n", itemCount,
res + 1);
1208 ok (
res > 0,
"SendMessage(LB_DIR, DDL_DRIVES, w*.c) failed - 0x%08lx\n",
GetLastError());
1216 ok (itemCount == itemCount_justDrives + itemCount_justFiles,
1217 "SendMessage(LB_DIR, DDL_DRIVES, w*.c) filled with %d entries, expected %d\n",
1218 itemCount, itemCount_justDrives + itemCount_justFiles);
1219 ok(
res + 1 == itemCount,
"SendMessage(LB_DIR, DDL_DRIVES, w*.c) returned incorrect index!\n");
1222 for (
i = 0;
i < itemCount;
i++) {
1229 ok( driveletter >=
'a' && driveletter <=
'z',
"Drive letter not in range a..z, got ascii %d\n", driveletter);
1233 (*(
p-1) ==
'c' || *(
p-1) ==
'C') &&
1234 (*(
p-2) ==
'.')),
"Element %d (%s) does not fit requested w*.c\n",
i,
pathBuffer);
1243 ok (
res > 0,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, *) failed - 0x%08lx\n",
GetLastError());
1249 ok (itemCount == itemCount_allFiles + itemCount_justDrives + itemCount_allDirs,
1250 "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES) filled with %d entries, expected %d\n",
1251 itemCount, itemCount_allFiles + itemCount_justDrives + itemCount_allDirs);
1252 ok(
res + 1 == itemCount,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, w*.c) returned incorrect index!\n");
1258 for (
i = 0;
i < itemCount;
i++) {
1263 ok( driveletter >=
'a' && driveletter <=
'z',
"Drive letter not in range a..z, got ascii %d\n", driveletter);
1271 ok (
res == itemCount_justDrives -1,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, %s) returned %d, expected %d\n",
1275 ok (itemCount ==
res + 1,
"SendMessage(LB_DIR) returned %d expected %d\n", itemCount,
res + 1);
1283 ok (
res > 0,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, w*.c) failed - 0x%08lx\n",
GetLastError());
1289 ok (itemCount == itemCount_justFiles + itemCount_justDrives,
1290 "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES) filled with %d entries, expected %d\n",
1291 itemCount, itemCount_justFiles + itemCount_justDrives);
1292 ok(
res + 1 == itemCount,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, w*.c) returned incorrect index!\n");
1298 for (
i = 0;
i < itemCount;
i++) {
1304 ok( driveletter >=
'a' && driveletter <=
'z',
"Drive letter not in range a..z, got ascii %d\n", driveletter);
1308 (*(
p-1) ==
'c' || *(
p-1) ==
'C') &&
1309 (*(
p-2) ==
'.')),
"Element %d (%s) does not fit requested w*.c\n",
i,
pathBuffer);
1317 ok (
res != -1,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err %lu\n",
GetLastError());
1320 ok (itemCount == itemCount_allDirs,
1321 "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE) filled with %d entries, expected %d\n",
1322 itemCount, itemCount_allDirs);
1323 ok(
res + 1 == itemCount,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) returned incorrect index!\n");
1336 ok (
res == -1,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, %s) returned %d, expected %d\n",
1340 ok (itemCount ==
res + 1,
"SendMessage(LB_DIR) returned %d expected %d\n", itemCount,
res + 1);
1347 ok (
res ==
LB_ERR,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, w*.c) returned %d expected %d\n",
res,
LB_ERR);
1352 "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE) filled with %d entries, expected %d\n",
1359 ok (
res > 0,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c,) failed - 0x%08lx\n",
GetLastError());
1363 ok (itemCount == itemCount_justDrives + itemCount_allDirs,
1364 "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE) filled with %d entries, expected %d\n",
1365 itemCount, itemCount_justDrives + itemCount_allDirs);
1366 ok(
res + 1 == itemCount,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c) returned incorrect index!\n");
1368 for (
i = 0;
i < itemCount;
i++) {
1373 ok( driveletter >=
'a' && driveletter <=
'z',
"Drive letter not in range a..z, got ascii %d\n", driveletter);
1376 "Element %d (%s) does not fit expected [...]\n",
i,
pathBuffer);
1384 ok (
res == itemCount_justDrives -1,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, %s) returned %d, expected %d\n",
1388 ok (itemCount ==
res + 1,
"SendMessage(LB_DIR) returned %d expected %d\n", itemCount,
res + 1);
1394 ok (
res >= 0,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c,) failed - 0x%08lx\n",
GetLastError());
1398 ok (itemCount == itemCount_justDrives,
1399 "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE) filled with %d entries, expected %d\n",
1400 itemCount, itemCount_justDrives);
1401 ok(
res + 1 == itemCount,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c) returned incorrect index!\n");
1403 for (
i = 0;
i < itemCount;
i++) {
1408 ok( driveletter >=
'a' && driveletter <=
'z',
"Drive letter not in range a..z, got ascii %d\n", driveletter);
1421#define ID_TEST_LABEL 1001
1422#define ID_TEST_LISTBOX 1002
1428 "Contents of static control before DlgDirList.",
1488 int itemCount_allDirs;
1489 int itemCount_justFiles;
1490 int itemCount_justDrives;
1531 "expected conversion to uppercase, got %s\n",
pathBuffer);
1536 ok (
strcmp(
"default contents",
pathBuffer),
"DlgDirList() did not modify static control!\n");
1540 ok (itemCount > 0,
"DlgDirList() did NOT fill the listbox!\n");
1541 itemCount_justFiles = itemCount;
1544 for (
i = 0;
i < itemCount;
i++) {
1549 (*(
p-1) ==
'c' || *(
p-1) ==
'C') &&
1550 (*(
p-2) ==
'.')),
"Element %d (%s) does not fit requested w*.c\n",
i,
pathBuffer);
1559 ok (itemCount == 0,
"DlgDirList() DID fill the listbox!\n");
1565 ok (
res == 1,
"DlgDirList(*.c, DDL_DIRECTORY) failed - 0x%08lx\n",
GetLastError());
1572 itemCount_allDirs = itemCount - itemCount_justFiles;
1573 ok (itemCount >= itemCount_justFiles,
1574 "DlgDirList(DDL_DIRECTORY) filled with %d entries, expected > %d\n",
1575 itemCount, itemCount_justFiles);
1580 for (
i = 0;
i < itemCount;
i++) {
1586 (*(
p-1) ==
'c' || *(
p-1) ==
'C') &&
1587 (*(
p-2) ==
'.')),
"Element %d (%s) does not fit requested w*.c\n",
i,
pathBuffer);
1597 ok (itemCount == itemCount_allDirs,
1598 "DlgDirList() incorrectly filled the listbox! (expected %d got %d)\n",
1599 itemCount_allDirs, itemCount);
1600 for (
i = 0;
i < itemCount;
i++) {
1604 "Element %d (%s) does not fit requested [...]\n",
i,
pathBuffer);
1612 ok (
res == 1,
"DlgDirList(*.c, DDL_DRIVES) failed - 0x%08lx\n",
GetLastError());
1621 "DlgDirList(DDL_DRIVES) filled with %d entries, expected at least %d\n",
1623 itemCount_justDrives = itemCount;
1626 for (
i = 0;
i < itemCount;
i++) {
1632 ok( driveletter >=
'a' && driveletter <=
'z',
"Drive letter not in range a..z, got ascii %d\n", driveletter);
1633 if (!(driveletter >=
'a' && driveletter <=
'z')) {
1636 itemCount_justDrives--;
1647 ok (itemCount == itemCount_justDrives,
"DlgDirList() incorrectly filled the listbox!\n");
1654 ok (
res == 1,
"DlgDirList(*.c, DDL_DIRECTORY|DDL_DRIVES) failed - 0x%08lx\n",
GetLastError());
1661 ok (itemCount == itemCount_justFiles + itemCount_justDrives + itemCount_allDirs,
1662 "DlgDirList(DDL_DIRECTORY|DDL_DRIVES) filled with %d entries, expected %d\n",
1663 itemCount, itemCount_justFiles + itemCount_justDrives + itemCount_allDirs);
1669 for (
i = 0;
i < itemCount;
i++) {
1675 ok( driveletter >=
'a' && driveletter <=
'z',
"Drive letter not in range a..z, got ascii %d\n", driveletter);
1679 (*(
p-1) ==
'c' || *(
p-1) ==
'C') &&
1680 (*(
p-2) ==
'.')),
"Element %d (%s) does not fit requested w*.c\n",
i,
pathBuffer);
1688 ok (
res == 1,
"DlgDirList(%s, DDL_DIRECTORY|DDL_DRIVES) returned %d expected 1\n",
BAD_EXTENSION,
res);
1691 ok (itemCount == itemCount_justDrives + itemCount_allDirs,
1692 "DlgDirList() incorrectly filled the listbox! (expected %d got %d)\n",
1693 itemCount_justDrives + itemCount_allDirs, itemCount);
1701 ok (
res == 1,
"DlgDirList(*.c, DDL_DIRECTORY|DDL_EXCLUSIVE) failed - 0x%08lx\n",
GetLastError());
1705 ok (itemCount == itemCount_allDirs,
1706 "DlgDirList(DDL_DIRECTORY|DDL_EXCLUSIVE) filled with %d entries, expected %d\n",
1707 itemCount, itemCount_allDirs);
1720 ok (
res == 1,
"DlgDirList(%s, DDL_DIRECTORY|DDL_EXCLUSIVE) returned %d expected 1\n",
BAD_EXTENSION,
res);
1723 ok (itemCount == itemCount_allDirs,
"DlgDirList() incorrectly filled the listbox!\n");
1730 ok (
res == 1,
"DlgDirList(*.c, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE) failed - 0x%08lx\n",
GetLastError());
1734 ok (itemCount == itemCount_justDrives + itemCount_allDirs,
1735 "DlgDirList(DDL_DIRECTORY|DDL_EXCLUSIVE) filled with %d entries, expected %d\n",
1736 itemCount, itemCount_justDrives + itemCount_allDirs);
1738 for (
i = 0;
i < itemCount;
i++) {
1743 ok( driveletter >=
'a' && driveletter <=
'z',
"Drive letter not in range a..z, got ascii %d\n", driveletter);
1746 "Element %d (%s) does not fit expected [...]\n",
i,
pathBuffer);
1754 ok (
res == 1,
"DlgDirList(%s, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE) returned %d expected 1\n",
BAD_EXTENSION,
res);
1757 ok (itemCount == itemCount_justDrives + itemCount_allDirs,
1758 "DlgDirList() incorrectly filled the listbox!\n");
1765 ok (
res != 0,
"DlgDirList(*, DDL_DIRECTORY|DDL_DRIVES) failed - 0x%08lx\n",
GetLastError());
1772 "DlgDirSelectEx() with no selection modified last error code from 0xdeadbeef to 0x%08lx\n",
1774 ok (
res == 0,
"DlgDirSelectEx() with no selection returned %d, expected 0\n",
res);
1781 for (
i = 0;
i < itemCount;
i++) {
1788 ok (
res ==
i,
"SendMessageA(LB_SETCURSEL, %d) failed\n",
i);
1789 if (
sscanf(itemBuffer,
"[-%c-]", &driveletter) == 1) {
1794 "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08lx\n",
1796 ok(
res == 1,
"DlgDirSelectEx() thinks %s (%s) is not a drive/directory!\n", itemBuffer,
pathBuffer);
1800 "%d: got \"%s\" expected \"%c:\"\n",
i,
pathBuffer, driveletter);
1801 }
else if (itemBuffer[0] ==
'[') {
1806 "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08lx\n",
1808 ok(
res == 1,
"DlgDirSelectEx() thinks %s (%s) is not a drive/directory!\n", itemBuffer,
pathBuffer);
1812 ok (*(
p-1) ==
'\\',
"DlgDirSelectEx did NOT tack on a backslash to dir, got %s\n",
pathBuffer);
1814 tempBuffer[0] =
'[';
1817 ok (!
strcmp(tempBuffer, itemBuffer),
"Formatted directory should be %s, got %s\n", tempBuffer, itemBuffer);
1823 "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08lx\n",
1825 ok(
res == 0,
"DlgDirSelectEx() thinks %s (%s) is a drive/directory!\n", itemBuffer,
pathBuffer);
1830 strcpy(tempBuffer, itemBuffer);
1844 for (
i = 0;
i < itemCount;
i++) {
1851 ok (
res ==
i,
"SendMessage(LB_SETCURSEL, %d) failed\n",
i);
1852 if (
sscanf(itemBuffer,
"[-%c-]", &driveletter) == 1) {
1857 "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08lx\n",
1859 ok(
res == 1,
"DlgDirSelectEx() thinks %s (%s) is not a drive/directory!\n", itemBuffer,
pathBuffer);
1863 "%d: got \"%s\" expected \"%c:\"\n",
i,
pathBuffer, driveletter);
1864 }
else if (itemBuffer[0] ==
'[') {
1869 "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08lx\n",
1871 ok(
res == 1,
"DlgDirSelectEx() thinks %s (%s) is not a drive/directory!\n", itemBuffer,
pathBuffer);
1875 ok (*(
p-1) ==
'\\',
"DlgDirSelectEx did NOT tack on a backslash to dir, got %s\n",
pathBuffer);
1877 tempBuffer[0] =
'[';
1880 ok (!
strcmp(tempBuffer, itemBuffer),
"Formatted directory should be %s, got %s\n", tempBuffer, itemBuffer);
1886 "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08lx\n",
1888 ok(
res == 0,
"DlgDirSelectEx() thinks %s (%s) is a drive/directory!\n", itemBuffer,
pathBuffer);
1893 strcpy(tempBuffer, itemBuffer);
1902 ok(
res ||
broken(!
res) ,
"DlgDirList failed to list C:\\ folders\n");
1904 "DlgDirList set the invalid path spec '%s', expected '*'\n",
pathBuffer);
1908 ok(
res ||
broken(!
res) ,
"DlgDirList failed to list C:\\* folders\n");
1910 "DlgDirList set the invalid path spec '%s', expected '*'\n",
pathBuffer);
1916 ok(!
res,
"DlgDirList should have failed with 0 but %d was returned\n",
res);
1918 "GetLastError should return 0x589, got 0x%lX\n",
GetLastError());
1925 static const DWORD styles[] =
1948 ok(
ret == 100,
"got %ld\n",
ret );
1995 if (
message == LB_GETLISTBOXINFO)
2009 if (!pGetListBoxInfo)
2011 win_skip(
"GetListBoxInfo() not available\n");
2022 ret = pGetListBoxInfo(listbox);
2033 static const DWORD styles[] =
2049 ok(items_size >= 100,
"expected at least 100, got %ld\n", items_size);
2052 ok(
ret == items_size,
"expected %ld, got %ld\n", items_size,
ret);
2056 ok(
ret == items_size,
"expected %ld, got %ld\n", items_size,
ret);
2060 ok(
ret == items_size,
"expected %ld, got %ld\n", items_size,
ret);
2066 ok(
ret == 0,
"unexpected return value %ld\n",
ret);
2070 for (
j = 0;
j < items_size - 1;
j++)
2073 ok(
ret ==
j,
"expected %d, got %ld\n",
j,
ret);
2079 ok(
ret == items_size,
"expected %ld, got %ld\n", items_size,
ret);
2083 ok(
ret == items_size - 1,
"expected %ld, got %ld\n", items_size - 1,
ret);
2085 ok(
ret == items_size,
"expected %ld, got %ld\n", items_size,
ret);
2087 ok(
ret > items_size,
"expected it to grow past %ld, got %ld\n", items_size,
ret);
2104 ok(capture == listbox,
"got %p expected %p\n", capture, listbox);
2110 ok(capture ==
NULL,
"got %p\n", capture);
2129 ok(
res == 0,
"Got wrong initial horizontal extent: %lu\n",
res);
2134 ok(br ==
TRUE,
"GetScrollInfo failed\n");
2135 ok(
sinfo.nMin == 0,
"got wrong min: %u\n",
sinfo.nMin);
2136 ok(
sinfo.nMax == 100,
"got wrong max: %u\n",
sinfo.nMax);
2138 "List box should not have a horizontal scroll bar\n");
2144 ok(
res == 64,
"Got wrong horizontal extent: %lu\n",
res);
2149 ok(br ==
TRUE,
"GetScrollInfo failed\n");
2150 ok(
sinfo.nMin == 0,
"got wrong min: %u\n",
sinfo.nMin);
2151 ok(
sinfo.nMax == 100,
"got wrong max: %u\n",
sinfo.nMax);
2153 "List box should not have a horizontal scroll bar\n");
2159 ok(
res == 184,
"Got wrong horizontal extent: %lu\n",
res);
2164 ok(br ==
TRUE,
"GetScrollInfo failed\n");
2165 ok(
sinfo.nMin == 0,
"got wrong min: %u\n",
sinfo.nMin);
2166 ok(
sinfo.nMax == 100,
"got wrong max: %u\n",
sinfo.nMax);
2168 "List box should not have a horizontal scroll bar\n");
2176 ok(
res == 0,
"Got wrong initial horizontal extent: %lu\n",
res);
2181 ok(br ==
TRUE,
"GetScrollInfo failed\n");
2182 ok(
sinfo.nMin == 0,
"got wrong min: %u\n",
sinfo.nMin);
2183 ok(
sinfo.nMax == 100,
"got wrong max: %u\n",
sinfo.nMax);
2185 "List box should not have a horizontal scroll bar\n");
2191 ok(
res == 64,
"Got wrong horizontal extent: %lu\n",
res);
2196 ok(br ==
TRUE,
"GetScrollInfo failed\n");
2197 ok(
sinfo.nMin == 0,
"got wrong min: %u\n",
sinfo.nMin);
2198 ok(
sinfo.nMax == 63,
"got wrong max: %u\n",
sinfo.nMax);
2200 "List box should not have a horizontal scroll bar\n");
2206 ok(
res == 184,
"Got wrong horizontal extent: %lu\n",
res);
2211 ok(br ==
TRUE,
"GetScrollInfo failed\n");
2212 ok(
sinfo.nMin == 0,
"got wrong min: %u\n",
sinfo.nMin);
2213 ok(
sinfo.nMax == 183,
"got wrong max: %u\n",
sinfo.nMax);
2215 "List box should have a horizontal scroll bar\n");
2220 ok(
res == 0,
"Got wrong horizontal extent: %lu\n",
res);
2225 ok(br ==
TRUE,
"GetScrollInfo failed\n");
2226 ok(
sinfo.nMin == 0,
"got wrong min: %u\n",
sinfo.nMin);
2227 ok(
sinfo.nMax == 0,
"got wrong max: %u\n",
sinfo.nMax);
2229 "List box should not have a horizontal scroll bar\n");
2237 ok(
res == 0,
"Got wrong initial horizontal extent: %lu\n",
res);
2242 ok(br ==
TRUE,
"GetScrollInfo failed\n");
2243 ok(
sinfo.nMin == 0,
"got wrong min: %u\n",
sinfo.nMin);
2244 ok(
sinfo.nMax == 0,
"got wrong max: %u\n",
sinfo.nMax);
2246 "List box should have a horizontal scroll bar\n");
2252 ok(
res == 64,
"Got wrong horizontal extent: %lu\n",
res);
2257 ok(br ==
TRUE,
"GetScrollInfo failed\n");
2258 ok(
sinfo.nMin == 0,
"got wrong min: %u\n",
sinfo.nMin);
2259 ok(
sinfo.nMax == 63,
"got wrong max: %u\n",
sinfo.nMax);
2261 "List box should have a horizontal scroll bar\n");
2267 ok(
res == 184,
"Got wrong horizontal extent: %lu\n",
res);
2272 ok(br ==
TRUE,
"GetScrollInfo failed\n");
2273 ok(
sinfo.nMin == 0,
"got wrong min: %u\n",
sinfo.nMin);
2274 ok(
sinfo.nMax == 183,
"got wrong max: %u\n",
sinfo.nMax);
2276 "List box should have a horizontal scroll bar\n");
2281 ok(
res == 0,
"Got wrong horizontal extent: %lu\n",
res);
2286 ok(br ==
TRUE,
"GetScrollInfo failed\n");
2287 ok(
sinfo.nMin == 0,
"got wrong min: %u\n",
sinfo.nMin);
2288 ok(
sinfo.nMax == 0,
"got wrong max: %u\n",
sinfo.nMax);
2290 "List box should have a horizontal scroll bar\n");
2319 static const DWORD invalid_styles[] =
2328 static const UINT invalid_idx[] = { -2, 2 };
2329 static const UINT valid_idx[] = { 0, 1 };
2338 ok(listbox !=
NULL,
"Failed to create ListBox window.\n");
2341 ok(
ret == 0,
"Unexpected return value %d.\n",
ret);
2343 ok(
ret == 1,
"Unexpected return value %d.\n",
ret);
2345 ok(
ret == 2,
"Unexpected return value %d.\n",
ret);
2369 ok(
ret ==
sizeof(
data),
"Unexpected return value %d.\n",
ret);
2373 ok(
ret ==
sizeof(
data),
"Unexpected return value %d.\n",
ret);
2377 ok(
ret == 0,
"Unexpected return value %d.\n",
ret);
2410 ok(
parent !=
NULL,
"Failed to create parent window.\n");
2418 ok(listbox !=
NULL,
"Failed to create a listbox.\n");
2421 ok((
style & invalid_styles[
i]) == invalid_styles[
i],
"%u: unexpected window styles %#lx.\n",
i,
style);
2447 {
L"ab", -1, 0, -1, 0, -1 },
2448 {
L"abc", -1, 0, -1, 0, -1 },
2449 {
L"abci", -1, 0, 0, 0, 0 },
2450 {
L"ABCI", -1, 0, 0, 0, 0 },
2451 {
L"ABC\xed", -1, 3, 3, 3, 3 },
2452 {
L"ABC\xcd", 4, 5, 3, 5, 3 },
2453 {
L"abcp", -1, 9, 9, 8, 8 },
2461 ok( listbox !=
NULL,
"Failed to create listbox\n" );
2490 ok(
ret == 0,
"wrong result %Id\n",
ret );
2493 ok(
ret == 0,
"wrong result %Id\n",
ret );
2495 ok(
ret == 1,
"wrong result %Id\n",
ret );
2498 ok(
ret == 0,
"wrong result %Id\n",
ret );
2500 ok(
ret == 2,
"wrong result %Id\n",
ret );
2503 ok(
ret == 0,
"wrong result %Id\n",
ret );
2512 { 1, 1, 1,
LB_ERR}, {0,0,0,0},
2513 { 2, 2, 2,
LB_ERR}, {0,0,0,0},
2518 { 1, 1, 1,
LB_ERR}, {0,0,0,0},
2519 { 2, 2, 2,
LB_ERR}, {0,0,0,0},
2522 {{ 0,
LB_ERR, 0, 0}, {0,0,0,0},
2523 { 1, 1, 1, 1}, {0,0,0,0},
2524 { 2, 1, 2, 1}, {0,0,0,0},
2525 { 0,
LB_ERR, 0, 2}, {0,0,0,0}};
2528 { 1, 1, 1,
LB_ERR}, {0,0,0,0},
2529 { 2, 2, 2,
LB_ERR}, {0,0,0,0},
2532 {{ 0,
LB_ERR, 0, 0}, {0,0,0,0},
2533 { 1, 1, 1, 1}, {0,0,0,0},
2534 { 2, 2, 2, 1}, {0,0,0,0},
2535 { 0,
LB_ERR, 0, 2}, {0,0,0,0}};
2538 { 1, 1, 1,
LB_ERR}, {0,0,0,0},
2539 { 2, 2, 2,
LB_ERR}, {0,0,0,0},
2542 {{ 0,
LB_ERR, 0, 0}, {0,0,0,0},
2543 { 1, 1, 1, 1}, {0,0,0,0},
2544 { 2, 2, 2, 1}, {0,0,0,0},
2545 { 0,
LB_ERR, 0, 2}, {0,0,0,0}};
2548 { 1, 1, 1,
LB_ERR}, {0,0,0,0},
2549 { 2, 2, 2,
LB_ERR}, {0,0,0,0},
2552 trace (
" Testing single selection...\n");
2554 trace (
" ... with NOSEL\n");
2556 trace (
" ... LBS_NODATA variant ...\n");
2558 trace (
" ... with NOSEL\n");
2561 trace (
" Testing multiple selection...\n");
2563 trace (
" ... with NOSEL\n");
2565 trace (
" ... LBS_NODATA variant ...\n");
2567 trace (
" ... with NOSEL\n");
2570 trace (
" Testing extended selection...\n");
2572 trace (
" ... with NOSEL\n");
2574 trace (
" ... LBS_NODATA variant ...\n");
2576 trace (
" ... with NOSEL\n");
2579 trace (
" Testing extended and multiple selection...\n");
2581 trace (
" ... with NOSEL\n");
2583 trace (
" ... LBS_NODATA variant ...\n");
2585 trace (
" ... with NOSEL\n");
static struct _test_info results[8]
static const char * wine_dbgstr_rect(const RECT *prc)
static NTSTATUS zero_data(device_extension *Vcb, fcb *fcb, uint64_t start, uint64_t length, PIRP Irp, LIST_ENTRY *rollback)
#define ERROR_INVALID_PARAMETER
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define FILE_ATTRIBUTE_NORMAL
#define WideCharToMultiByte
#define MultiByteToWideChar
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI RemoveDirectoryA(IN LPCSTR lpPathName)
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
BOOL WINAPI SetCurrentDirectoryA(IN LPCSTR lpPathName)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl sscanf(const char *, const char *,...) __WINE_CRT_SCANF_ATTR(2
_ACRTIMP char *__cdecl strchr(const char *, int)
_ACRTIMP size_t __cdecl strlen(const char *)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
#define check(expected, result)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble r
GLsizei const GLchar *const * strings
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl void winetest_pop_context(void)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl winetest_push_context(const char *fmt,...) __WINE_PRINTF_ATTR(1
static struct test_info tests[]
static void test_listbox_height(void)
static LRESULT WINAPI main_window_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
static LRESULT CALLBACK listbox_container_window_procA(HWND hwnd, UINT uiMsg, WPARAM wParam, LPARAM lParam)
static void test_listbox_dlgdir(void)
static HWND create_listbox(DWORD add_style, HWND parent)
static void test_listbox_LB_DIR(void)
static void test_set_count(void)
#define listbox_ok(t, s, got)
static void listbox_query(HWND handle, struct listbox_stat *results)
static void test_WM_MEASUREITEM(void)
static void test_itemfrompoint(void)
static BOOL on_listbox_container_create(HWND hwnd, CREATESTRUCTA *lpcs)
static void test_LB_SETCURSEL(void)
static void test_changing_selection_styles(void)
static void keypress(HWND handle, WPARAM keycode, BYTE scancode, BOOL extended)
static void test_init_storage(void)
static void test_LB_SETSEL(void)
static void test_missing_lbuttonup(void)
#define listbox_test_query(exp, got)
static void test_LBS_NODATA(void)
static void test_LB_SELITEMRANGE(void)
static void test_extents(void)
static HWND create_parent(void)
static void test_ownerdraw(void)
static const char BAD_EXTENSION[]
static void test_GetListBoxInfo(void)
static BOOL RegisterListboxWindowClass(HINSTANCE hInst)
static void buttonpress(HWND handle, WORD x, WORD y)
static void test_listbox_item_data(void)
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
static unsigned int got_drawitem
static int strcmp_aw(LPCWSTR strw, const char *stra)
static void test_LB_FINDSTRING(void)
static LRESULT WINAPI listbox_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
static void check_item_height(void)
static int lb_getlistboxinfo
#define WS_OVERLAPPEDWINDOW
#define LBS_DISABLENOSCROLL
#define LBS_OWNERDRAWFIXED
#define LBS_OWNERDRAWVARIABLE
#define LBS_NOINTEGRALHEIGHT
struct listbox_stat sel sel_todo
struct listbox_stat click click_todo
struct listbox_stat init init_todo
struct listbox_stat step step_todo
DWORD WINAPI GetLastError(void)
#define ERROR_NO_WILDCARD_CHARACTERS
#define ERROR_SETCOUNT_ON_BAD_LB
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPI GetClipBox(_In_ HDC, _Out_ LPRECT)
HGDIOBJ WINAPI GetCurrentObject(_In_ HDC, _In_ UINT)
BOOL WINAPI GetTextMetricsA(_In_ HDC, _Out_ LPTEXTMETRICA)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define SetWindowLongPtrA
#define LB_FINDSTRINGEXACT
BOOL WINAPI RedrawWindow(_In_opt_ HWND, _In_opt_ LPCRECT, _In_opt_ HRGN, _In_ UINT)
#define LB_SETHORIZONTALEXTENT
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
LONG WINAPI GetWindowLongA(_In_ HWND, _In_ int)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
LONG WINAPI SetWindowLongA(_In_ HWND, _In_ int, _In_ LONG)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
BOOL WINAPI ValidateRect(_In_opt_ HWND, _In_opt_ LPCRECT)
BOOL WINAPI SetForegroundWindow(_In_ HWND)
#define LB_GETANCHORINDEX
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI IsRectEmpty(_In_ LPCRECT)
HDC WINAPI GetDCEx(_In_opt_ HWND, _In_opt_ HRGN, _In_ DWORD)
HWND WINAPI GetCapture(void)
#define GetWindowLongPtrA
HWND WINAPI GetDesktopWindow(void)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
HWND WINAPI SetFocus(_In_opt_ HWND)
#define LB_GETHORIZONTALEXTENT
BOOL WINAPI UpdateWindow(_In_ HWND)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
HWND WINAPI GetWindow(_In_ HWND, _In_ UINT)
#define KEYEVENTF_EXTENDEDKEY
int WINAPI GetScrollPos(_In_ HWND, _In_ int)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
BOOL WINAPI GetScrollInfo(_In_ HWND, _In_ int, _Inout_ LPSCROLLINFO)
BOOL WINAPI GetUpdateRect(_In_ HWND, _Out_opt_ LPRECT, _In_ BOOL)
BOOL WINAPI DestroyWindow(_In_ HWND)
int WINAPI DlgDirListA(_In_ HWND, _Inout_ LPSTR, _In_ int, _In_ int, _In_ UINT)
BOOL WINAPI DlgDirSelectExA(_In_ HWND hwndDlg, _Out_writes_(chCount) LPSTR lpString, _In_ int chCount, _In_ int idListBox)
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)