35#define BS_PUSHBOX 0x0000000AL
38#define IS_WNDPROC_HANDLE(x) (((ULONG_PTR)(x) >> 16) == (~0u >> 16))
48#define ID_BUTTON 0x000e
50#define COMBINED_SEQ_INDEX 0
51#define PARENT_CD_SEQ_INDEX 1
52#define NUM_MSG_SEQUENCES 2
70 ACTCTX_SECTION_KEYED_DATA
data;
86#define MAKEFUNC_ORD(f, ord) (p##f = (void*)GetProcAddress(hmod, (LPSTR)(ord)))
92#define X(f) p##f = (void *)GetProcAddress(hmod, #f);
104 int min_timeout = 100;
131 static LONG defwndproc_counter = 0;
157 defwndproc_counter++;
159 defwndproc_counter--;
173#define set_test_cd_state(s) do { \
174 test_cd.state = (s); \
175 test_cd.empty = TRUE; \
176 test_cd.line = __LINE__; \
179#define set_test_cd_ret(r) do { \
181 test_cd.empty = TRUE; \
182 test_cd.line = __LINE__; \
192 static LONG defwndproc_counter = 0;
193 static LONG beginpaint_counter = 0;
194 static HDC cd_first_hdc;
220 UINT state =
cd->uItemState & ~CDIS_SHOWKEYBOARDCUES;
225 cd_first_hdc =
cd->hdc;
230 "[%u] CDDS_ITEM is set\n",
test_cd.button);
233 "[%u] expected uItemState %u, got %u\n",
test_cd.button,
241 msg.stage =
cd->dwDrawStage;
242 if (
cd->hdc == cd_first_hdc)
249 ret &= ~CDRF_NOTIFYPOSTPAINT;
250 cd->dwItemSpec = 0xdeadbeef;
253 ret &= ~CDRF_NOTIFYPOSTERASE;
257 ok_(__FILE__,
test_cd.line)(
cd->dwItemSpec == 0xdeadbeef,
258 "[%u] NMCUSTOMDRAW was not shared, stage %u\n",
test_cd.button,
msg.stage);
271 ok(bcd->
hdr.
hwndFrom !=
NULL,
"Received BCN_DROPDOWN with no hwnd attached, wParam %lu id %lu\n",
273 ok(bcd->
hdr.
idFrom ==
wParam,
"[%u] Mismatch between wParam (%lu) and idFrom (%lu)\n",
290 beginpaint_counter++;
292 beginpaint_counter--;
297 defwndproc_counter++;
299 defwndproc_counter--;
628 hwnd =
CreateWindowExA(0,
WC_BUTTONA,
"test",
style, 0, 0, 50, 14,
parent, menuid, 0,
NULL);
647 const struct message *setfocus;
648 const struct message *killfocus;
649 const struct message *setstyle;
650 const struct message *setstate;
651 const struct message *clearstate;
652 const struct message *setcheck;
653 enum cd_seq_type cd_setfocus_type;
654 enum cd_seq_type cd_setstyle_type;
655 enum cd_seq_type cd_setstate_type;
656 enum cd_seq_type cd_setcheck_type;
661 cd_seq_normal, cd_seq_normal, cd_seq_normal, cd_seq_optional },
665 cd_seq_normal, cd_seq_normal, cd_seq_normal, cd_seq_optional },
669 cd_seq_optional, cd_seq_optional, cd_seq_optional, cd_seq_optional },
673 cd_seq_optional, cd_seq_optional, cd_seq_optional, cd_seq_optional },
677 cd_seq_optional, cd_seq_optional, cd_seq_optional, cd_seq_optional },
681 cd_seq_optional, cd_seq_optional, cd_seq_optional, cd_seq_optional },
685 cd_seq_optional, cd_seq_optional, cd_seq_optional, cd_seq_optional },
689 cd_seq_empty, cd_seq_empty, cd_seq_empty, cd_seq_empty },
693 cd_seq_normal, cd_seq_empty, cd_seq_empty, cd_seq_empty },
697 cd_seq_optional, cd_seq_optional, cd_seq_optional, cd_seq_optional },
701 cd_seq_empty, cd_seq_empty, cd_seq_empty, cd_seq_empty },
705 cd_seq_optional, cd_seq_optional, cd_seq_optional, cd_seq_empty },
709 cd_seq_optional, cd_seq_optional, cd_seq_optional, cd_seq_empty },
713 cd_seq_optional, cd_seq_optional, cd_seq_optional, cd_seq_empty },
717 cd_seq_optional, cd_seq_optional, cd_seq_optional, cd_seq_empty }
720 const struct message *seq, *cd_seq;
729 ok(
hwnd != 0,
"Failed to create button window\n");
738 100, 100, 200, 200, 0, 0, 0,
NULL);
739 ok(
parent != 0,
"Failed to create parent window\n");
746 ok(hfont2 !=
NULL,
"Failed to create Tahoma font\n");
748#define check_cd_seq(type, context) do { \
749 if (button[i].type != cd_seq_optional || !test_cd.empty) \
750 ok_sequence(sequences, PARENT_CD_SEQ_INDEX, cd_seq, "[CustomDraw] " context, FALSE); \
762 ok(
hwnd !=
NULL,
"Failed to create a button.\n");
781 ok(dlg_code ==
button[
i].dlg_code,
"%u: wrong dlg_code %08x\n",
i, dlg_code);
931 "button[%u]: unexpected font selected after WM_PRINTCLIENT\n",
i);
937 "button[%u]: unexpected font selected after WM_PAINT\n",
i);
943 if (
button[
i].cd_setfocus_type != cd_seq_empty &&
955 {
"CDRF_SKIPDEFAULT | CDRF_NOTIFYPOSTERASE | CDRF_NOTIFYPOSTPAINT",
959 {
"CDRF_NOTIFYPOSTERASE | CDRF_NOTIFYPOSTPAINT",
974 if (
button[
i].cd_setfocus_type != cd_seq_optional || !
test_cd.empty)
1025 static const WCHAR testW[] = {
't',
'e',
's',
't',0};
1058 ok(!
strcmp(buffA,
"Button"),
"got %s\n", buffA);
1062 ok(!
strcmp(buffA,
"Button"),
"got %s\n", buffA);
1066 hwnd =
CreateWindowExW(0,
nameW,
testW,
BS_CHECKBOX, 0, 0, 50, 14,
NULL, 0, 0,
NULL);
1071 ok(!
strcmp(buffA,
"Button"),
"got %s\n", buffA);
1075 ok(!
strcmp(buffA,
"Button"),
"got %s\n", buffA);
1085 WCHAR tes_w[] = {
't',
'e',
's', 0};
1086 WCHAR deadbeef_w[] = {
'd',
'e',
'a',
'd',
'b',
'e',
'e',
'f', 0};
1100 win_skip(
"BCM_GETNOTE message is unavailable. Skipping note tests\n");
1119 ok(!
ret,
"Expect BCM_GETNOTE return false\n");
1120 ok(!
lstrcmpW(buffer_w, deadbeef_w),
"Expect note: %s, got: %s\n",
1128 ok(
ret == 0,
"Expect note length: %d, got: %d\n", 0,
ret);
1133 ok(
ret,
"Expect BCM_SETNOTE return true\n");
1141 ok(
ret,
"Expect BCM_GETNOTE return true\n");
1156 ok(!
ret,
"Expect BCM_GETNOTE return false\n");
1167 ok(
ret,
"Expect BCM_SETNOTE return false\n");
1176 ok(
ret,
"Expect BCM_GETNOTE return true\n");
1177 ok(
lstrlenW(buffer_w) == 0,
"Expect note length 0\n");
1182 ok(
ret == 0,
"Expect note length: %d, got: %d\n", 0,
ret);
1188 ok(!
ret,
"Expect BCM_SETNOTE return false\n");
1198 ok(!
ret,
"Expect BCM_SETNOTE return false\n");
1199 ok(!
lstrcmpW(buffer_w, deadbeef_w),
"Expect note: %s, got: %s\n",
1210 ok(!
ret,
"Expect BCM_GETNOTE return false\n");
1211 ok(!
lstrcmpW(buffer_w, deadbeef_w),
"Expect note: %s, got: %s\n",
1227 ok(!
ret,
"Expect BCM_GETNOTE return false\n");
1255 ok(
GetObjectW(hbmp1x1,
sizeof(bm), &bm),
"Expect GetObjectW() success\n");
1256 ok(bm.bmWidth == 1 && bm.bmHeight == 1,
"Expect bitmap size: %d,%d, got: %d,%d\n", 1, 1,
1257 bm.bmWidth, bm.bmHeight);
1259 ok(
GetObjectW(hbmp2x2,
sizeof(bm), &bm),
"Expect GetObjectW() success\n");
1260 ok(bm.bmWidth == 2 && bm.bmHeight == 2,
"Expect bitmap size: %d,%d, got: %d,%d\n", 2, 2,
1261 bm.bmWidth, bm.bmHeight);
1264 ZeroMemory(&icon_info2x2,
sizeof(icon_info2x2));
1266 icon_info2x2.
hbmMask = hmask2x2;
1269 ok(hicon2x2 !=
NULL,
"Expect CreateIconIndirect() success\n");
1272 ok(
GetIconInfo(hicon2x2, &icon_info),
"Expect GetIconInfo() success\n");
1275 ok(bm.bmWidth == 2 && bm.bmHeight == 2,
"Expect bitmap size: %d,%d, got: %d,%d\n", 2, 2,
1276 bm.bmWidth, bm.bmHeight);
1282 ok(
hwnd !=
NULL,
"Expect hwnd to be not NULL\n");
1285 ok(
hbmp == 0,
"Expect hbmp == 0\n");
1288 ok(
hbmp == 0,
"Expect hbmp == 0\n");
1290 ok(
hbmp != 0,
"Expect hbmp != 0\n");
1293 ok(
hbmp != 0,
"Expect hbmp != 0\n");
1295 ok(
hbmp == 0,
"Expect hbmp == 0\n");
1301 ok(
hwnd !=
NULL,
"Expect hwnd to be not NULL\n");
1303 ok(
hbmp == 0,
"Expect hbmp == 0\n");
1305 ok(
hbmp != 0,
"Expect hbmp != 0\n");
1308 ok(bm.bmWidth == 1 && bm.bmHeight == 1,
"Expect bitmap size: %d,%d, got: %d,%d\n", 1, 1,
1309 bm.bmWidth, bm.bmHeight);
1313 hwnd =
CreateWindowA(
WC_BUTTONA,
"test", default_style, 0, 0, 100, 100, 0, 0, 0, 0);
1314 ok(
hwnd !=
NULL,
"Expect hwnd to be not NULL\n");
1316 ok(
hbmp == 0,
"Expect hbmp == 0\n");
1321 win_skip(
"Show both image and text is not supported. Skip following tests.\n");
1325 ok(
hbmp != 0,
"Expect hbmp != 0\n");
1328 ok(bm.bmWidth == 1 && bm.bmHeight == 1,
"Expect bitmap size: %d,%d, got: %d,%d\n", 1, 1,
1329 bm.bmWidth, bm.bmHeight);
1333 hwnd =
CreateWindowA(
WC_BUTTONA,
"test", default_style |
BS_ICON, 0, 0, 100, 100, 0, 0, 0,
1335 ok(
hwnd !=
NULL,
"Expect hwnd to be not NULL\n");
1337 ok(hicon == 0,
"Expect hicon == 0\n");
1339 ok(hicon != 0,
"Expect hicon != 0\n");
1341 ok(
GetIconInfo(hicon, &icon_info),
"Expect GetIconInfo() success\n");
1344 ok(bm.bmWidth == 2 && bm.bmHeight == 2,
"Expect bitmap size: %d,%d, got: %d,%d\n", 2, 2,
1345 bm.bmWidth, bm.bmHeight);
1351 hwnd =
CreateWindowA(
WC_BUTTONA,
"test", default_style, 0, 0, 100, 100, 0, 0, 0, 0);
1352 ok(
hwnd !=
NULL,
"Expect hwnd to be not NULL\n");
1354 ok(hicon == 0,
"Expect hicon == 0\n");
1356 ok(hicon != 0,
"Expect hicon != 0\n");
1358 ok(
GetIconInfo(hicon, &icon_info),
"Expect GetIconInfo() success\n");
1361 ok(bm.bmWidth == 2 && bm.bmHeight == 2,
"Expect bitmap size: %d,%d, got: %d,%d\n", 2, 2,
1362 bm.bmWidth, bm.bmHeight);
1370 ok(
hwnd !=
NULL,
"Expect hwnd to be not NULL\n");
1372 ok(hicon == 0,
"Expect hicon == 0\n");
1374 ok(hicon != 0,
"Expect hicon != 0\n");
1376 ok(
GetIconInfo(hicon, &icon_info),
"Expect GetIconInfo() success\n");
1379 ok(bm.bmWidth == 2 && bm.bmHeight == 2,
"Expect bitmap size: %d,%d, got: %d,%d\n", 2, 2,
1380 bm.bmWidth, bm.bmHeight);
1386 hwnd =
CreateWindowA(
WC_BUTTONA,
"test", default_style |
BS_ICON, 0, 0, 100, 100, 0, 0, 0,
1388 ok(
hwnd !=
NULL,
"Expect hwnd to be not NULL\n");
1390 ok(
hbmp == 0,
"Expect hbmp == 0\n");
1392 ok(
hbmp != 0,
"Expect hbmp != 0\n");
1395 ok(bm.bmWidth == 1 && bm.bmHeight == 1,
"Expect bitmap size: %d,%d, got: %d,%d\n", 1, 1,
1396 bm.bmWidth, bm.bmHeight);
1402 ok(
hwnd !=
NULL,
"Expect hwnd to be not NULL\n");
1404 ok(
hbmp == 0,
"Expect hbmp == 0\n");
1406 ok(
hbmp != 0,
"Expect hbmp != 0\n");
1409 ok(bm.bmWidth == 1 && bm.bmHeight == 1,
"Expect bitmap size: %d,%d, got: %d,%d\n", 1, 1,
1410 bm.bmWidth, bm.bmHeight);
1414 hwnd =
CreateWindowA(
WC_BUTTONA,
"test", default_style |
BS_ICON, 0, 0, 100, 100, 0, 0, 0,
1416 ok(
hwnd !=
NULL,
"Expect hwnd to be not NULL\n");
1418 ok(hicon == 0,
"Expect hicon == 0\n");
1420 ok(hicon != 0,
"Expect hicon != 0\n");
1422 ok(
GetIconInfo(hicon, &icon_info),
"Expect GetIconInfo() success\n");
1425 ok(bm.bmWidth == 2 && bm.bmHeight == 2,
"Expect bitmap size: %d,%d, got: %d,%d\n", 2, 2,
1426 bm.bmWidth, bm.bmHeight);
1432 hwnd =
CreateWindowA(
WC_BUTTONA,
"test", default_style |
BS_ICON, 0, 0, 100, 100, 0, 0, 0, 0);
1433 ok(
hwnd !=
NULL,
"Expect hwnd to be not NULL\n");
1435 ok(
hbmp == 0,
"Expect hbmp == 0\n");
1437 ok(
hbmp != 0,
"Expect hbmp != 0\n");
1440 ok(bm.bmWidth == 1 && bm.bmHeight == 1,
"Expect bitmap size: %d,%d, got: %d,%d\n", 1, 1,
1441 bm.bmWidth, bm.bmHeight);
1445 hwnd =
CreateWindowA(
WC_BUTTONA,
"test", default_style |
BS_BITMAP, 0, 0, 100, 100, 0, 0, 0, 0);
1446 ok(
hwnd !=
NULL,
"Expect hwnd to be not NULL\n");
1448 ok(hicon == 0,
"Expect hicon == 0\n");
1450 ok(hicon != 0,
"Expect hicon != 0\n");
1452 ok(
GetIconInfo(hicon, &icon_info),
"Expect GetIconInfo() success\n");
1455 ok(bm.bmWidth == 2 && bm.bmHeight == 2,
"Expect bitmap size: %d,%d, got: %d,%d\n", 2, 2,
1456 bm.bmWidth, bm.bmHeight);
1504 win_skip(
"BCM_GETSPLITINFO message is unavailable. Skipping related tests\n");
1521 ok(
info.size.cx == glyph_size,
"[%u] expected %d default size.cx, got %d\n",
button, glyph_size,
info.size.cx);
1522 ok(
info.size.cy == 0,
"[%u] expected 0 default size.cy, got %d\n",
button,
info.size.cy);
1525 info.size.cx = glyph_size + 7;
1529 info.size.cx =
info.size.cy = 0xdeadbeef;
1533 ok(
info.size.cx == glyph_size + 7,
"[%u] expected %d, got %d\n",
button, glyph_size + 7,
info.size.cx);
1541 info.size.cx =
info.size.cy = 0xdeadbeef;
1545 ok(
info.size.cx == glyph_size,
"[%u] expected %d, got %d\n",
button, glyph_size,
info.size.cx);
1546 ok(
info.size.cy == -20,
"[%u] expected -20, got %d\n",
button,
info.size.cy);
1548 info.size.cx = -glyph_size - 7;
1552 info.size.cx =
info.size.cy = 0xdeadbeef;
1556 ok(
info.size.cx == glyph_size,
"[%u] expected %d, got %d\n",
button, glyph_size,
info.size.cx);
1557 ok(
info.size.cy == -10,
"[%u] expected -10, got %d\n",
button,
info.size.cy);
1561 info.size.cx = glyph_size + 7;
1565 info.size.cx =
info.size.cy = 0xdeadbeef;
1569 ok(
info.size.cx == glyph_size + 7,
"[%u] expected %d, got %d\n",
button, glyph_size + 7,
info.size.cx);
1570 ok(
info.size.cy == 11,
"[%u] expected 11, got %d\n",
button,
info.size.cy);
1582 ok(
info.size.cx == glyph_size,
"[%u] expected %d, got %d\n",
button, glyph_size,
info.size.cx);
1588 dummy.size.cx = glyph_size + 11;
1596 ok(
info.size.cx == glyph_size + 11,
"[%u] expected %d, got %d\n",
button, glyph_size,
info.size.cx);
1611 ok(
info.size.cx == border_w,
"[%u] expected %d, got %d\n",
button, border_w,
info.size.cx);
1616 dummy.size.cx = glyph_size + 5;
1625 ok(
info.size.cx == glyph_size + 5,
"[%u] expected %d, got %d\n",
button, glyph_size + 5,
info.size.cx);
1640 ok(
info.size.cx == glyph_size,
"[%u] expected %d, got %d\n",
button, glyph_size,
info.size.cx);
1656 ok(
info.size.cx == 42 + border_w,
"[%u] expected %d, got %d\n",
button, 42 + border_w,
info.size.cx);
1658 pImageList_Destroy(
img);
1660 dummy.size.cx = glyph_size + 5;
1676 ok(
info.size.cx == glyph_size,
"[%u] expected %d, got %d\n",
button, glyph_size,
info.size.cx);
1690 ok(
info.size.cx == border_w,
"[%u] expected %d, got %d\n",
button, border_w,
info.size.cx);
1696 static const DWORD styles[] =
1725 100, 100, 200, 200, 0, 0, 0,
NULL);
1726 ok(
parent != 0,
"Failed to create parent window\n");
1730 struct button_desc *
desc;
1734 ok(
hwnd !=
NULL,
"Failed to create a button.\n");
1741 ok(
desc->self ==
hwnd,
"Unexpected 'self' field.\n");
1742 ok(
desc->parent ==
parent,
"Unexpected 'parent' field.\n");
1775 ok(
index == 0,
"Expect index == 0\n");
1786 ok(
ret,
"Expect BCM_GETIMAGELIST return true\n");
1787 ok(biml.himl == 0 &&
IsRectEmpty(&biml.margin) && biml.uAlign == 0,
1788 "Expect BUTTON_IMAGELIST is empty\n");
1795 "Expect BCM_SETIMAGELIST return true\n");
1801 ok(
ret,
"Expect BCM_SETIMAGELIST return true\n");
1807 ok(
ret,
"Expect BCM_SETIMAGELIST return true\n");
1809 ok(
ret,
"Expect BCM_GETIMAGELIST return true\n");
1810 ok(biml.himl ==
himl,
"Expect himl to be same\n");
1816 ok(!
ret,
"Expect BCM_SETIMAGELIST return false\n");
1818 ok(
ret,
"Expect BCM_GETIMAGELIST return true\n");
1819 ok(biml.himl ==
himl,
"Expect himl to be same\n");
1825 ok(
ret,
"Expect BCM_SETIMAGELIST return true\n");
1827 ok(!
ret,
"Expect BCM_GETIMAGELIST return false\n");
1832 pImageList_Destroy(
himl);
1843 SetRect(&margin_in, 2, 1, 3, 4);
1851 ok(
ret,
"Expect ret to be true\n");
1856 ok(
ret,
"Expect ret to be true\n");
1859 ok(
ret,
"Expect ret to be true\n");
1860 ok(
EqualRect(&margin_in, &margin_out),
"Expect margins to be equal\n");
1864 ok(!
ret,
"Expect ret to be false\n");
1867 ok(
ret,
"Expect ret to be true\n");
1868 ok(
EqualRect(&margin_in, &margin_out),
"Expect margins to be equal\n");
1872 ok(
ret,
"Expect ret to be true\n");
1874 ok(!
ret,
"Expect ret to be true\n");
1898 static const char *button_text2 =
"WWWW\nWWWW";
1899 static const char *button_text =
"WWWW";
1900 static const WCHAR button_note_short[] = {
'W',0 };
1901 static const WCHAR button_note_long[] = {
'W',
'W',
'W',
'W',
'W',
'W',
'W',
'W',
'W',
'W',
'W',
'W',
'W',
'W',
'W',
'W',0 };
1902 static const WCHAR button_note_wordy[] = {
'T',
'h',
'i',
's',
' ',
'i',
's',
' ',
'a',
' ',
'l',
'o',
'n',
'g',
' ',
'n',
'o',
't',
'e',
' ',
'f',
'o',
'r',
' ',
't',
'h',
'e',
' ',
'b',
'u',
't',
't',
'o',
'n',
',',
' ',
1903 'w',
'i',
't',
'h',
' ',
'm',
'a',
'n',
'y',
' ',
'w',
'o',
'r',
'd',
's',
',',
' ',
'w',
'h',
'i',
'c',
'h',
' ',
's',
'h',
'o',
'u',
'l',
'd',
' ',
'b',
'e',
' ',
1904 'o',
'v',
'e',
'r',
'a',
'l',
'l',
' ',
'l',
'o',
'n',
'g',
'e',
'r',
' ',
't',
'h',
'a',
'n',
' ',
't',
'h',
'e',
' ',
't',
'e',
'x',
't',
' ',
'(',
'g',
'i',
'v',
'e',
'n',
' ',
1905 't',
'h',
'e',
' ',
's',
'm',
'a',
'l',
'l',
'e',
'r',
' ',
'f',
'o',
'n',
't',
')',
' ',
'a',
'n',
'd',
' ',
't',
'h',
'u',
's',
' ',
'w',
'r',
'a',
'p',
'.',0 };
1912 const LONG client_width = 400, client_height = 200, extra_width = 123, large_height = 500;
1945 ok(!
ret,
"Expect BCM_GETIDEALSIZE message to return false.\n");
1953 ok(
hfont !=
NULL,
"Failed to create test font.\n");
1961 text_width =
rect.right -
rect.left;
1972 ok(
ret,
"Expect BCM_GETIDEALSIZE message to return true\n");
1973 if (
size.cx == client_width &&
size.cy == client_height)
1976 win_skip(
"Skipping further tests on XP and 2003\n");
1988#define set_split_info(hwnd) do { \
1989 BUTTON_SPLITINFO _info; \
1991 _info.mask = BCSIF_SIZE; \
1992 _info.size.cx = extra_width; \
1993 _info.size.cy = large_height; \
1994 _ret = SendMessageA(hwnd, BCM_SETSPLITINFO, 0, (LPARAM)&_info); \
1995 ok(_ret == TRUE, "Expected BCM_SETSPLITINFO message to return true\n"); \
2009 ok(
ret,
"Expect BCM_GETIDEALSIZE message to return true\n");
2012 "Expect ideal cx %d >= %d and ideal cy %d >= %d\n",
size.cx,
2014 ok(
size.cy < large_height,
"Expect ideal cy %d < %d\n",
size.cy, large_height);
2021 style = pushtype[
k].style | default_style | aligns[
i] | aligns[
j];
2022 hwnd =
CreateWindowA(
WC_BUTTONA, button_text,
style, 0, 0, client_width, client_height,
NULL,
NULL, 0,
NULL);
2029 ok(
ret,
"Expect BCM_GETIDEALSIZE message to return true\n");
2033 "Style: 0x%08x expect ideal cx %d >= %d and ideal cy %d >= %d\n",
style,
size.cx,
2037 "Style: 0x%08x expect ideal cx %d >= %d and ideal cy %d >= %d\n",
style,
size.cx,
2039 ok(
size.cy < large_height,
"Expect ideal cy %d < %d\n",
size.cy, large_height);
2047 biml.
uAlign = imagelist_aligns[
i];
2056 ok(
ret,
"Expect BCM_GETIDEALSIZE message to return true\n");
2059 "Align:%d expect ideal cx %d >= %d and ideal cy %d >= %d\n", biml.uAlign,
size.cx,
2063 "Align:%d expect ideal cx %d >= %d and ideal cy %d >= %d\n", biml.uAlign,
size.cx,
2067 "Align:%d expect ideal cx %d >= %d and ideal cy %d >= %d\n",
2069 ok(
size.cy < large_height,
"Expect ideal cy %d < %d\n",
size.cy, large_height);
2090 ok(
ret,
"Expect BCM_GETIDEALSIZE message to return true\n");
2093 "Expect ideal cx %d >= %d and ideal cy %d >= %d\n",
size.cx,
2095 ok(
size.cy < large_height,
"Expect ideal cy %d < %d\n",
size.cy, large_height);
2107 ok(
ret,
"Expect BCM_GETIDEALSIZE message to return true\n");
2109 "Expect ideal cx %d >= %d and ideal cy %d >= %d\n",
size.cx,
2111 ok(
size.cy < large_height,
"Expect ideal cy %d < %d\n",
size.cy, large_height);
2116#undef set_split_info
2127 ok(
ret,
"Expect BCM_GETIDEALSIZE message to return true\n");
2129 &&
size.cy >=
tm.tmHeight),
2130 "Expect ideal cx %d within range (%d, %d ) and ideal cy %d within range (%d, %d )\n",
size.cx,
2143 ok(
ret,
"Expect BCM_GETIDEALSIZE message to return true\n");
2145 "Expect ideal cx %d >= %d and ideal cy %d >= %d\n",
size.cx,
image_width + text_width,
size.cy,
2157 ok(
ret,
"Expect BCM_GETIDEALSIZE message to return true\n");
2159 "Expect ideal cx %d >= %d and ideal cy %d >= %d\n",
size.cx,
image_width + text_width,
size.cy,
2168 hwnd =
CreateWindowA(
WC_BUTTONA,
"",
style, 0, 0, client_width, client_height,
NULL,
NULL, 0,
NULL);
2174 ok(
ret,
"Expect BCM_GETIDEALSIZE message to return true\n");
2178 ok((
size.cx == 0 &&
size.cy > 0),
"Style 0x%08x expect ideal cx %d == %d and ideal cy %d > %d\n",
2183 ok(
size.cx == client_width &&
size.cy == client_height,
2184 "Style 0x%08x expect size.cx == %d and size.cy == %d, got size.cx: %d size.cy: %d\n",
style,
2185 client_width, client_height,
size.cx,
size.cy);
2191 for (line_count = 1; line_count <= 2; line_count++)
2196 style |= default_style;
2204 ok(
ret,
"Expect BCM_GETIDEALSIZE message to return true\n");
2209 ok(
size.cx == client_width &&
size.cy == client_height,
2210 "Style 0x%08x expect ideal size (%d,%d), got (%d,%d)\n",
style, client_width, client_height,
size.cx,
2216 "Style 0x%08x expect ideal cx %d == %d and ideal cy %d > %d\n",
style,
size.cx, 0,
2221 height = line_count == 2 ? 2 *
tm.tmHeight :
tm.tmHeight;
2222 ok(
size.cx >= 0 &&
size.cy >=
height,
"Style 0x%08x expect ideal cx %d >= 0 and ideal cy %d >= %d\n",
2230 hwnd =
CreateWindowA(
WC_BUTTONA,
"a",
style, 0, 0, client_width, client_height,
NULL,
NULL, 0,
NULL);
2231 ok(
hwnd !=
NULL,
"Expected hwnd not NULL\n");
2234 ok(
ret ==
TRUE,
"Expected BCM_SETNOTE to return true\n");
2238 ok(
ret ==
TRUE,
"Expected BCM_GETIDEALSIZE message to return true\n");
2239 ok(
size.cx == 13 &&
size.cy > 0,
"Expected ideal cx %d == %d and ideal cy %d > %d\n",
size.cx, 13,
size.cy, 0);
2244 ok(
ret ==
TRUE,
"Expected BCM_GETIDEALSIZE message to return true\n");
2245 ok(
size.cx < 32767,
"Expected ideal cx to have been adjusted\n");
2250 ok(
ret ==
TRUE,
"Expected BCM_SETNOTE to return true\n");
2254 ok(
ret ==
TRUE,
"Expected BCM_GETIDEALSIZE message to return true\n");
2261 ok(
ret ==
TRUE,
"Expected BCM_GETIDEALSIZE message to return true\n");
2266 ok(
ret ==
TRUE,
"Expected BCM_SETNOTE to return true\n");
2269 ok(
ret ==
TRUE,
"Expected BCM_GETIDEALSIZE message to return true\n");
2275 ok(
ret ==
TRUE,
"Expected BCM_GETIDEALSIZE message to return true\n");
2280 pImageList_Destroy(
himl);
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
static const char * wine_dbgstr_rect(const RECT *prc)
static const WCHAR nameW[]
static void init_msg_sequences(struct msg_sequence **seq, int n)
static void flush_sequences(struct msg_sequence **seq, int n)
BOOL WINAPI SetWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uIDSubclass, DWORD_PTR dwRef)
BOOL WINAPI RemoveWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uID)
LRESULT WINAPI DefSubclassProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
#define ERROR_INSUFFICIENT_BUFFER
INT WINAPI ImageList_Add(HIMAGELIST himl, HBITMAP hbmImage, HBITMAP hbmMask)
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
#define ERROR_INVALID_PARAMETER
#define ERROR_NOT_SUPPORTED
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetTickCount(VOID)
BOOL WINAPI FindActCtxSectionStringW(DWORD dwFlags, const GUID *lpExtGuid, ULONG ulId, LPCWSTR lpSearchStr, PACTCTX_SECTION_KEYED_DATA pInfo)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
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
static const WCHAR testW[]
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
#define memcpy(s1, s2, n)
static PEXPLICIT_ACCESSW *static HMODULE hmod
static const WCHAR desc[]
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
unsigned __int3264 UINT_PTR
#define BS_AUTORADIOBUTTON
#define WS_OVERLAPPEDWINDOW
#define CDRF_NOTIFYPOSTERASE
#define BUTTON_IMAGELIST_ALIGN_CENTER
#define BS_DEFCOMMANDLINK
#define BUTTON_IMAGELIST_ALIGN_TOP
struct _IMAGELIST * HIMAGELIST
#define BUTTON_IMAGELIST_ALIGN_LEFT
#define CDRF_NOTIFYPOSTPAINT
#define BCM_SETTEXTMARGIN
#define BS_DEFSPLITBUTTON
#define BCM_GETNOTELENGTH
#define BUTTON_IMAGELIST_ALIGN_RIGHT
#define BUTTON_IMAGELIST_ALIGN_BOTTOM
#define BCM_SETDROPDOWNSTATE
#define BCM_GETTEXTMARGIN
DWORD WINAPI GetVersion()
CHAR lfFaceName[LF_FACESIZE]
TW_UINT32 TW_UINT16 TW_UINT16 MSG
static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx)
static void unload_v6_module(ULONG_PTR cookie, HANDLE hCtx)
INT WINAPI DrawTextA(HDC hdc, LPCSTR str, INT count, LPRECT rect, UINT flags)
DWORD WINAPI GetLastError(void)
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
HFONT WINAPI CreateFontIndirectA(_In_ const LOGFONTA *)
HGDIOBJ WINAPI GetCurrentObject(_In_ HDC, _In_ UINT)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
BOOL WINAPI GetTextMetricsA(_In_ HDC, _Out_ LPTEXTMETRICA)
BOOL WINAPI DeleteDC(_In_ HDC)
HWND WINAPI GetFocus(void)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
LRESULT WINAPI DispatchMessageA(_In_ const MSG *)
HICON WINAPI CreateIconIndirect(_In_ PICONINFO)
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)
BOOL WINAPI ReleaseCapture(void)
LONG WINAPI GetWindowLongA(_In_ HWND, _In_ int)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
UINT WINAPI RealGetWindowClassA(_In_ HWND hwnd, _Out_writes_to_(cchClassNameMax, return) LPSTR ptszClassName, _In_ UINT cchClassNameMax)
BOOL WINAPI GetIconInfo(_In_ HICON, _Out_ PICONINFO)