106 static HMENU hmenupopup;
123 trace(
"WM_MEASUREITEM received data %lx size %dx%d\n",
137 char chrs[]=
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
144 trace(
"WM_DRAWITEM received hwnd %p hmenu %p itemdata %ld item %d rc %s itemrc: %s\n",
189 "Menu window handle is NULL!\n");
192 ok( hmenupopup ==
hmenu,
"MN_GETHMENU returns %p expected %p\n",
245 ok(
ret ==
FALSE,
"GetMenuBarInfo should not have been successful\n");
246 ok(
err == 0xdeadbeef,
"err = %d\n",
err);
258 ok(!
ret,
"GetMenuBarInfo succeeded\n");
264 ok(!
ret,
"GetMenuBarInfo succeeded\n");
270 ok(
ret ==
FALSE,
"GetMenuBarInfo should have failed\n");
271 ok(
err == 0xdeadbeef,
"err = %d\n",
err);
277 ok(
ret ==
FALSE,
"GetMenuBarInfo should have failed\n");
284 ok(
ret ==
FALSE,
"GetMenuBarInfo should have failed\n");
285 ok(
err == 0xdeadbeef,
"err = %d\n",
err);
299 ok(
ret,
"AppendMenu failed.\n");
301 ok(
ret,
"AppendMenu failed.\n");
308 ok(
ret ==
FALSE,
"GetMenuBarInfo should have failed\n");
309 ok(
err == 0xdeadbeef,
"err = %d\n",
err);
317 ok(
ret,
"GetWindowRect failed.\n");
319 ok(
ret,
"GetMenuItemRect failed.\n");
332 ok(
ret,
"GetMenuItemRect failed.\n");
349 POINT client_top_left;
372 client_top_left.
x = 0;
373 client_top_left.
y = 0;
377 ok(item_rect.
left == client_top_left.
x,
"Expect item_rect.left %d == %d\n", item_rect.
left, client_top_left.
x);
378 ok(item_rect.
right <= window_rect.
right,
"Expect item_rect.right %d <= %d\n", item_rect.
right, window_rect.
right);
381 ok(item_rect.
top - (window_rect.
top + caption_height) <= 1,
"Expect item_rect.top %d - %d <= 1\n", item_rect.
top,
382 window_rect.
top + caption_height);
383 ok(item_rect.
bottom - (client_top_left.
y - 1) <= 1,
"Expect item_rect.bottom %d - %d <= 1\n", item_rect.
bottom,
384 client_top_left.
y - 1);
389 ok(item_rect.
left == client_top_left.
x,
"Expect item_rect.left %d == %d\n", item_rect.
left, client_top_left.
x);
390 ok(item_rect.
right == client_top_left.
x,
"Expect item_rect.right %d == %d\n", item_rect.
right, client_top_left.
x);
391 ok(item_rect.
top == client_top_left.
y,
"Expect item_rect.top %d == %d\n", item_rect.
top, client_top_left.
y);
392 ok(item_rect.
bottom == client_top_left.
y,
"Expect item_rect.bottom %d == %d\n", item_rect.
bottom,
415 ok( menu !=
NULL,
"no system menu\n" );
417 for (
i = 0xf000;
i < 0xf200;
i++)
434 ok(
ret,
"%x menu item not found\n",
i );
439 ok( !
ret,
"%x menu item found\n",
i );
442 found[
i - 0xf000] =
ret;
445 for (
i = 0xf000;
i < 0xf200;
i++)
448 if (
res == -1)
ok( !found[
i - 0xf000],
"could not check existent item %x\n",
i );
449 else ok( found[
i - 0xf000],
"could check non-existent item %x\n",
i );
452 if (
res == -1)
ok( !found[
i - 0xf000],
"could not enable existent item %x\n",
i );
453 else ok( found[
i - 0xf000],
"could enable non-existent item %x\n",
i );
456 if (
res == -1)
ok( !found[
i - 0xf000],
"could not get state existent item %x\n",
i );
457 else ok( found[
i - 0xf000],
"could get state of non-existent item %x\n",
i );
459 if (!found[
i - 0xf000])
462 ok( !
ret,
"could remove non-existent item %x\n",
i );
467 else if (!
ret)
ok( !found[
i - 0xf000],
"could not modify existent item %x\n",
i );
468 else ok( found[
i - 0xf000],
"could modify non-existent item %x\n",
i );
472 else if (!
ret)
ok( !found[
i - 0xf000],
"could not modify existent item %x\n",
i );
473 else ok( found[
i - 0xf000],
"could modify non-existent item %x\n",
i );
476 ok( !
ret,
"could modify non-existent item %x\n",
i );
487 else if (!
ret)
ok( !found[
i - 0xf000],
"could not set existent item %x\n",
i );
488 else ok( found[
i - 0xf000],
"could set non-existent item %x\n",
i );
490 ok( !
ret,
"could modify non-existent item %x\n",
i );
500 else if (!
ret)
ok( !found[
i - 0xf000],
"could not set existent item %x\n",
i );
501 else ok( found[
i - 0xf000],
"could set non-existent item %x\n",
i );
503 ok( !
ret,
"could modify non-existent item %x\n",
i );
507 for (
i = 0xf000;
i < 0xf200;
i++)
523 ok(
ret,
"%x menu item not found\n",
i );
528 ok( !
ret,
"%x menu item found\n",
i );
539 ok(
res == -1,
"CheckMenuItem succeeded\n" );
541 ok(
res == -1,
"EnableMenuItem succeeded\n" );
543 ok(
res == -1,
"GetMenuState succeeded\n" );
545 ok( !
ret,
"RemoveMenu succeeded\n" );
551 ok( !
ret,
"ModifyMenu succeeded on SC_TASKLIST-1\n" );
560 ok(
ret,
"failed to set SC_TASKLIST\n" );
562 ok( !
ret,
"succeeded setting SC_TASKLIST+1\n" );
564 ok( !
ret,
"succeeded setting by position\n" );
573 ok(
ret,
"failed to set SC_TASKLIST\n" );
575 ok( !
ret,
"succeeded setting SC_TASKLIST+1\n" );
577 ok( !
ret,
"succeeded setting by position\n" );
605 ok(!
ret ||
broken(
ret) ,
"Menu handle should have been destroyed\n");
611 ok(
ret,
"WM_INITMENU should have been sent\n");
642 const int itemid = 0x1234567;
664 mi.fMask |= MIM_STYLE;
668 ok(
ret ,
"Menu handle is not valid\n");
682 mi.fMask |= MIM_STYLE;
684 ok( !
ret ,
"GetMenuInfo should have failed\n");
687 ok( !
ret ,
"Menu handle should be invalid\n");
722 ok(
ret,
"AppendMenu failed for %d\n",
k-1);
731 "item rectangles are not separated by 4 pixels space\n");
734 "menu item has wrong height: %d should be %d\n",
738 "There should not be a space between the rows, gap is %d\n",
744 "Wrong height field in MEASUREITEMSTRUCT, expected %d or %d actual %d\n",
754 "columns should be 4 pixels to the left (actual %d).\n",
758 "width of owner drawn menu item is wrong. Got %d expected %d\n",
762 "Height is incorrect. Got %d expected %d\n",
772 ok( mii.
wID == 1,
"wrong id %x\n", mii.
wID );
786 ok(
ret,
"AppendMenu failed for %d\n",
i);
793 "width of owner drawn menu item is wrong. Got %d expected %d\n",
797 "Height of owner drawn menu item is wrong. Got %d expected %d\n",
834 hastab = *(
p + 1) ? 2 : 1;
838 if(hastab && !ispop)
return;
844 ok( submenu != 0,
"CreateMenu failed with error %d\n",
GetLastError());
856 mi.fMask = MIM_STYLE;
867 RECT rc = {100, 50, 400, 70};
920 "menu height wrong, got %d expected %d (%d)\n",
928 else if (mnuopt == 0)
930 else if (mnuopt == 1)
946 trace(
"*** count %d %s text \"%s\" bitmap %p bmsize %d,%d textsize %d+%d,%d mnuopt %d hastab %d\n",
949 trace(
" check %d,%d arrow %d avechar %d\n",
973 int count, szidx, txtidx, bmpidx, hassub, mnuopt, ispop;
976 memset( bmfill, 0xcc,
sizeof( bmfill));
982 arrowwidth = bm.bmWidth;
988 mi.fMask = MIM_STYLE;
992 ok(
MNS_CHECKORBMP ==
mi.dwStyle,
"System Menu Style is %08x, without the bit %08x\n",
998 ok(
HBMMENU_POPUP_CLOSE == mii.hbmpItem,
"Item info did not get the right hbitmap: got %p expected %p\n",
1001 memset(&mii, 0x81,
sizeof(mii));
1002 mii.
cbSize =
sizeof(mii);
1005 mii.
cch =
sizeof(bmfill);
1008 ok(got,
"GetMenuItemInfo failed\n");
1015 ok(mii.
cch != 0,
"cch should not be 0\n");
1018 mii.
cbSize =
sizeof(mii);
1020 mii.hbmpItem = (
HBITMAP)0x81818181;
1022 ok(got,
"GetMenuItemInfo failed\n");
1029 ok(mii.
cch != 0,
"cch should not be 0\n");
1035 trace(
" check %d,%d arrow %d avechar %d\n",
1040 for( ispop=1; ispop >= 0; ispop--){
1041 static SIZE bmsizes[]= {
1042 {10,10},{38,38},{1,30},{55,5}};
1043 for( szidx=0; szidx <
ARRAY_SIZE(bmsizes); szidx++) {
1048 for( hassub = 0; hassub < 2 ; hassub++) {
1049 for( mnuopt = 0; mnuopt < 3 ; mnuopt++){
1050 for( bmpidx = 0; bmpidx <
ARRAY_SIZE(bitmaps); bmpidx++) {
1052 if( !bitmaps[bmpidx] && szidx > 0)
continue;
1057 if( !ispop && hassub)
continue;
1087 WCHAR strbackW[0x80];
1088 static CHAR blah[] =
"blah";
1089 static const WCHAR expectedString[] = {
'D',
'u',
'm',
'm',
'y',
' ',
's',
't',
'r',
'i',
'n',
'g', 0};
1096 info.dwTypeData = blah;
1098 info.dwItemData = 0;
1111 ok( !
strcmp(
string,
"blah" ),
"menu item name differed\n");
1114 strcpy(
string,
"Dummy string");
1121 ok (rc,
"InsertMenuItem failed\n");
1123 strcpy(
string,
"Garbage");
1125 ok (!
strcmp( strback,
"Dummy string" ),
"Menu text from Ansi version incorrect\n");
1128 ok (
ret,
"GetMenuStringW on ownerdraw entry failed\n");
1129 ok (!
lstrcmpW( strbackW, expectedString ),
"Menu text from Unicode version incorrect\n");
1135 ok (!rc,
"SetMenuItemInfoA succeeded unexpectedly\n");
1141 ok (!rc,
"SetMenuItemInfoA succeeded unexpectedly\n");
1149 info.dwTypeData= (
char *)0xdeadbeef;
1151 ok (rc,
"SetMenuItemInfo failed\n");
1155 ok (!
strcmp( strback,
"Dummy string" ),
"Menu text from Ansi version incorrect\n");
1162 info.dwTypeData= (
char *)0xdeadbee2;
1164 ok (!rc,
"SetMenuItemInfo unexpectedly worked\n");
1168 info.dwTypeData= (
char *)0xdeadbee3;
1170 ok (rc,
"SetMenuItemInfo failed\n");
1174 ok (!
strcmp( strback,
"Dummy string" ),
"Menu text from Ansi version incorrect\n");
1183 ok (rc,
"SetMenuItemInfo failed\n");
1186 ok (!
strcmp( strback,
"string2" ),
"Menu text from Ansi version incorrect\n");
1194 ok (rc,
"InsertMenuItem failed\n");
1196 "GetMenuString on ownerdraw entry succeeded.\n");
1198 ok (!
ret,
"GetMenuStringW on ownerdraw entry succeeded.\n");
1206 if (
n <= 0)
return 0;
1207 while ((--
n > 0) && *str1 && (*str1 == *str2)) { str1++; str2++; }
1208 return *str1 - *str2;
1214 while ((*
p++ = *
src++));
1234 info.hSubMenu = submenu;
1235 info.hbmpChecked = checked;
1236 info.hbmpUnchecked = unchecked;
1238 info.dwTypeData = type_data;
1244 if (!
expect)
ok_(__FILE__,
line)( !
ret,
"InsertMenuItem should have failed.\n" );
1261 info.dwTypeData = type_data;
1268 ok_(__FILE__,
line)( !
ret,
"GetMenuItemInfo should have failed.\n" );
1274 "wrong type %x/%x\n",
info.fType,
type );
1277 "wrong state %x/%x\n",
info.fState,
state );
1280 "wrong id %x/%x\n",
info.wID,
id );
1283 "wrong submenu %p/%p\n",
info.hSubMenu, submenu );
1287 "wrong bmpchecked %p/%p\n",
info.hbmpChecked, checked );
1289 "wrong bmpunchecked %p/%p\n",
info.hbmpUnchecked, unchecked );
1293 "wrong item data %lx/%lx\n",
info.dwItemData,
data );
1296 "wrong bmpitem %p/%p\n",
info.hbmpItem,
item );
1298 "wrong type data %p/%p\n",
info.dwTypeData, type_data );
1301 "wrong len %x/%x\n",
info.cch, out_len );
1306 "menu item name differed from '%s' '%s'\n", expname,
info.dwTypeData );
1309 "menu item name wrong\n" );
1317 ok_(__FILE__,
line)( !
ret,
"GetMenuString should have failed\n" );
1348 info.hSubMenu = submenu;
1349 info.hbmpChecked = checked;
1350 info.hbmpUnchecked = unchecked;
1352 info.dwTypeData = type_data;
1361#define TMII_INSMI( c1,d1,e1,f1,g1,h1,i1,j1,k1,l1,m1,eret1 )\
1362 hmenu = CreateMenu();\
1363 submenu = CreateMenu();\
1364 if(ansi)strcpy( string, init );\
1365 else strcpyW( string, init );\
1366 insert_menu_item( __LINE__, hmenu, ansi, c1, d1, e1, f1, g1, h1, i1, j1, k1, l1, m1, eret1 )
1369#define TMII_GMII( c2,l2,\
1370 d3,e3,f3,g3,h3,i3,j3,k3,l3,m3,\
1371 expname, eret2, eret3)\
1372 check_menu_item_info( __LINE__, hmenu, ansi, c2, d3, e3, f3, g3, h3, i3, j3, k3, l2, l3, m3, \
1373 expname, eret2, eret3 )
1376 RemoveMenu(hmenu, 0, TRUE );\
1377 DestroyMenu( hmenu );\
1378 DestroyMenu( submenu );
1381#define TMII_MODM( flags, id, data ) \
1382 modify_menu( __LINE__, hmenu, ansi, flags, id, data )
1385#define TMII_SMII( c1,d1,e1,f1,g1,h1,i1,j1,k1,l1,m1 ) \
1386 set_menu_item_info( __LINE__, hmenu, ansi, c1, d1, e1, f1, g1, h1, i1, j1, k1, l1, m1 )
1399 WCHAR txtW[]={
'W',
'i',
'n',
'e',0};
1400 WCHAR initW[]={
'X',
'Y',
'Z',0};
1411 trace(
"%s string %p hbm %p txt %p\n", ansi ?
"ANSI tests: " :
"Unicode tests:",
string,
hbm, txt);
1414 TMII_INSMI(
MIIM_TYPE,
MFT_STRING, 0, 0, 0, 0, 0, 0, txt, 0, 0,
OK );
1416 MFT_STRING, 0, 0, 0, 0, 0, 0,
string, 4, 0,
1419 TMII_INSMI(
MIIM_TYPE,
MFT_STRING|
MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, txt, 0, 0,
OK );
1421 MFT_STRING|
MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1424 TMII_INSMI(
MIIM_TYPE,
MFT_BITMAP, -1, -1, 0, 0, 0, -1,
hbm, 6, 0,
OK );
1426 MFT_BITMAP, 0, 0, 0, 0, 0, 0,
hbm, 0,
hbm,
1429 TMII_INSMI(
MIIM_TYPE,
MFT_BITMAP|
MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1,
hbm, 6, 0,
OK );
1431 MFT_BITMAP|
MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0,
hbm, 0,
hbm,
1435 TMII_INSMI(
MIIM_TYPE,
MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 6, 0,
OK );
1437 MFT_STRING, 0, 0, 0, 0, 0, 0,
NULL, 4, 0,
1440 TMII_INSMI(
MIIM_TYPE,
MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 6, 0,
OK );
1442 MFT_STRING, 0, 0, 0, 0, 0, 0,
string, 4, 0,
1445 TMII_INSMI(
MIIM_TYPE,
MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 6, 0,
OK );
1447 MFT_STRING, 0, 0, 0, 0, 0, 0,
string, 3, 0,
1450 TMII_INSMI(
MIIM_FTYPE|
MIIM_STRING,
MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1,
NULL, 0, 0,
OK );
1452 MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0,
NULL, 0, 0,
1456 TMII_INSMI(
MIIM_TYPE|
MIIM_STRING,
MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 6, 0,
ER );
1458 TMII_INSMI(
MIIM_TYPE,
MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 6, 0,
OK );
1460 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1463 TMII_INSMI(
MIIM_TYPE|
MIIM_FTYPE,
MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 6, 0,
ER );
1465 TMII_INSMI(
MIIM_TYPE,
MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 6, 0,
OK );
1467 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1470 TMII_INSMI(
MIIM_TYPE|
MIIM_BITMAP,
MFT_BITMAP, -1, -1, 0, 0, 0, -1,
hbm, 6,
hbm,
ER );
1473 TMII_INSMI(
MIIM_TYPE,
MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 6, 0,
OK );
1475 MFT_STRING, 0, 0, 0, 0, 0, 0,
string, 4, 0,
1478 TMII_INSMI(
MIIM_TYPE,
MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 6, 0,
OK );
1480 MFT_STRING, 0, 0, 0, 0, 0, 0,
string, 4, 0,
1483 TMII_INSMI(
MIIM_TYPE|
MIIM_ID,
MFT_STRING, -1, 888, 0, 0, 0, -1, txt, 6, 0,
OK );
1485 MFT_STRING, 0, 888, 0, 0, 0, 0,
string, 4, 0,
1488 TMII_INSMI(
MIIM_TYPE|
MIIM_DATA,
MFT_STRING, -1, -1, 0, 0, 0, 999, txt, 6, 0,
OK );
1490 MFT_STRING, 0, 0, 0, 0, 0, 999,
string, 4, 0,
1495 TMII_INSMI(
MIIM_TYPE,
MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 6, 0,
OK );
1497 MFT_STRING, 0, 0, 0, 0, 0, 0,
string, 4, 0,
1501 TMII_INSMI(
MIIM_TYPE,
MFT_STRING|
MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, txt, 6, 0,
OK );
1503 MFT_STRING|
MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0,
string, 0, 0,
1506 TMII_INSMI(
MIIM_TYPE,
MFT_STRING|
MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1,
NULL, 0, 0,
OK );
1508 MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0,
string, 0, 0,
1511 TMII_INSMI(
MIIM_TYPE,
MFT_STRING|
MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1,
NULL, 0, 0,
OK );
1513 MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0,
string, 80, 0,
1516 TMII_INSMI(
MIIM_TYPE,
MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 0, 0,
OK );
1518 0, 0, 0, 0, 0, 0, 0,
string, 80, 0,
1522 TMII_INSMI(
MIIM_STRING|
MIIM_FTYPE,
MFT_STRING|
MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, txt, 0, 0,
OK );
1524 MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0,
string, 4, 0,
1528 TMII_INSMI(
MIIM_STRING|
MIIM_FTYPE,
MFT_STRING|
MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, txt, 0, 0,
OK );
1530 MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0,
NULL, 4,
NULL,
1533 TMII_INSMI(
MIIM_STRING|
MIIM_FTYPE,
MFT_STRING|
MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1,
NULL, 0, 0,
OK );
1535 MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0,
string, 0, 0,
1538 TMII_INSMI(
MIIM_STRING|
MIIM_FTYPE,
MFT_STRING, -1, -1, 0, 0, 0, -1,
NULL, 0, 0,
OK );
1540 MFT_SEPARATOR, 0, 0, 0, 0, 0, 0,
string, 0, 0,
1543 TMII_INSMI(
MIIM_STRING|
MIIM_FTYPE,
MFT_STRING, -1, -1, 0, 0, 0, -1,
NULL, 0, 0,
OK );
1545 MFT_SEPARATOR, 0, 0, 0, 0, 0, 0,
NULL, 0, 0,
1550 TMII_INSMI(
MIIM_BITMAP, -1, -1, -1, 0, 0, 0, -1, 0, -1,
hbm,
OK );
1552 MFT_BITMAP, 0, 0, 0, 0, 0, 0,
hbm, 0,
hbm,
1555 TMII_INSMI(
MIIM_BITMAP, -1, -1, -1, 0, 0, 0, -1, 0, -1,
hbm,
OK );
1557 0, 0, 0, 0, 0, 0, 0,
string, 80,
hbm,
1561 TMII_INSMI(
MIIM_BITMAP|
MIIM_FTYPE,
MFT_BITMAP, -1, -1, 0, 0, 0, -1, 0, -1,
hbm,
ER );
1564 TMII_INSMI(
MIIM_BITMAP|
MIIM_FTYPE,
MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, 0, -1,
hbm,
OK );
1566 MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0,
string, 80,
hbm,
1570 TMII_INSMI(
MIIM_FTYPE,
MFT_BITMAP, -1, -1, 0, 0, 0, -1, 0, -1, 0,
ER );
1574 TMII_INSMI(
MIIM_SUBMENU|
MIIM_FTYPE,
MFT_STRING, -1, -1, submenu, 0, 0, -1, txt, 0, 0,
OK );
1576 0, 0, 0, submenu, 0, 0, 0,
string, 80, 0,
1579 TMII_INSMI(
MIIM_SUBMENU|
MIIM_FTYPE,
MFT_STRING, -1, -1, submenu, 0, 0, -1,
empty, 0, 0,
OK );
1581 0, 0, 0, submenu, 0, 0, 0,
string, 80, 0,
1585 TMII_INSMI(
MIIM_SUBMENU|
MIIM_FTYPE,
MFT_STRING, -1, -1, submenu, 0, 0, -1, txt, 0, 0,
OK );
1587 MFT_STRING|
MFT_SEPARATOR, 0, 0, 0, 0, 0, 0,
string, 0, 0,
1590 MFT_SEPARATOR, 0, 0, submenu, 0, 0, 0,
string, 80, 0,
1594 TMII_INSMI(
MIIM_SUBMENU|
MIIM_FTYPE,
MFT_STRING, -1, -1, (
HMENU)999, 0, 0, -1, txt, 0, 0,
ER );
1597 TMII_INSMI(
MIIM_TYPE,
MFT_SEPARATOR, 0, 0, 0, 0, 0, 0, txt, 0, 0,
OK );
1599 MFT_SEPARATOR, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1602 TMII_INSMI(
MIIM_TYPE,
MFT_BITMAP|
MFT_SEPARATOR, -1, -1, 0, 0, 0, -1,
hbm, 6, 0,
OK );
1604 MFT_BITMAP|
MFT_SEPARATOR, 0, 0, 0, 0, 0, 0,
hbm, 0,
hbm,
1609 TMII_INSMI(
MIIM_STRING|
MIIM_BITMAP, -1, -1, -1, 0, 0, 0, -1, txt, 6,
hbm,
OK );
1611 MFT_STRING, 0, 0, 0, 0, 0, 0,
string, 4,
hbm,
1615 TMII_INSMI(
MIIM_FTYPE|
MIIM_STRING|
MIIM_BITMAP,
MFT_SEPARATOR, -1, -1, 0, 0, 0, -1, txt, 6,
hbm,
OK );
1617 MFT_SEPARATOR, 0, 0, 0, 0, 0, 0,
string, 4,
hbm,
1621 TMII_INSMI(
MIIM_FTYPE|
MIIM_STRING,
MFT_SEPARATOR, -1, -1, 0, 0, 0, -1, txt, 6, 0,
OK );
1623 MFT_SEPARATOR, 0, 0, 0, 0, 0, 0,
NULL, 4,
NULL,
1626 TMII_INSMI(
MIIM_STRING|
MIIM_BITMAP, -1, -1, -1, 0, 0, 0, -1, txt, 6,
hbm,
OK );
1628 MFT_BITMAP, 0, 0, 0, 0, 0, 0,
hbm, 4,
hbm,
1631 TMII_INSMI(
MIIM_FTYPE|
MIIM_STRING|
MIIM_BITMAP,
MFT_SEPARATOR, -1, -1, 0, 0, 0, -1, txt, 6,
hbm,
OK );
1633 MFT_SEPARATOR|
MFT_BITMAP, 0, 0, 0, 0, 0, 0,
hbm, 4,
hbm,
1637 TMII_INSMI(
MIIM_FTYPE|
MIIM_STRING,
MFT_SEPARATOR|
MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, txt, 6, 0,
OK );
1639 MFT_SEPARATOR|
MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0,
NULL, 4,
NULL,
1642 TMII_INSMI(
MIIM_FTYPE|
MIIM_STRING|
MIIM_BITMAP,
MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, txt, 6,
hbm,
OK );
1644 MFT_BITMAP|
MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0,
hbm, 4,
hbm,
1647 TMII_INSMI(
MIIM_FTYPE|
MIIM_STRING|
MIIM_BITMAP,
MFT_SEPARATOR|
MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, txt, 6,
hbm,
OK );
1649 MFT_SEPARATOR|
MFT_BITMAP|
MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0,
hbm, 4,
hbm,
1653 TMII_INSMI(
MIIM_STRING|
MIIM_FTYPE|
MIIM_ID,
MFT_STRING|
MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, txt, 0, 0,
OK );
1655 MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0,
NULL, 4,
NULL,
1659 TMII_INSMI(
MIIM_STRING,
MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 0, 0,
OK );
1662 MFT_OWNERDRAW, 0, 0, 0, 0, 0, 787,
string, 4, 0,
1666 TMII_INSMI(
MIIM_STRING,
MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 0, 0,
OK );
1669 MFT_BITMAP, 0, 545, 0, 0, 0, 0,
string, 0,
hbm,
1673 TMII_INSMI(
MIIM_BITMAP,
MFT_STRING, -1, -1, 0, 0, 0, -1, 0, -1,
hbm,
OK );
1675 MFT_STRING, 0, 0, 0, 0, 0, 0,
string, 0,
hbm,
1679 MFT_STRING, 0, 545, 0, 0, 0, 0,
string, 4, 0,
1683 TMII_INSMI(
MIIM_BITMAP,
MFT_STRING, -1, -1, 0, 0, 0, -1, 0, -1,
hbm,
OK );
1686 MFT_SEPARATOR, 0, 545, 0, 0, 0, 0,
string, 0, 0,
1690 TMII_INSMI(
MIIM_BITMAP, -1 , -1, -1, 0, 0, 0, -1, 0, -1,
hbm,
OK );
1693 MFT_STRING, 0, 545, 0, 0, 0, 0,
string, 0, 0,
1697 TMII_INSMI(
MIIM_BITMAP, -1, -1, -1, 0, 0, 0, -1, 0, -1,
hbm,
OK );
1700 MFT_OWNERDRAW, 0, 0, 0, 0, 0, 232,
string, 0,
hbm,
1704 TMII_INSMI(
MIIM_FTYPE|
MIIM_STRING|
MIIM_BITMAP,
MFT_SEPARATOR, -1, -1, 0, 0, 0, -1, txt, 6,
hbm,
OK );
1706 0, 0, 0, 0, 0, 0, 0,
string, 80, 0,
1710 TMII_INSMI(
MIIM_BITMAP, -1, -1, -1, 0, 0, 0, -1, 0, -1, dummy_hbm,
OK );
1712 MFT_SEPARATOR, 0, 0, 0, 0, 0, 0,
NULL, 0,
NULL,
1715 TMII_INSMI(
MIIM_BITMAP, -1, -1, -1, 0, 0, 0, -1, 0, -1, dummy_hbm,
OK );
1717 MFT_SEPARATOR, 0, 0, 0, 0, 0, 0,
string, 80,
NULL,
1720 TMII_INSMI(
MIIM_STRING|
MIIM_BITMAP, -1, -1, -1, 0, 0, 0, -1, txt, 6, dummy_hbm,
OK );
1722 MFT_STRING, 0, 0, 0, 0, 0, 0,
string, 4,
NULL,
1725 TMII_INSMI(
MIIM_FTYPE|
MIIM_STRING|
MIIM_BITMAP,
MFT_SEPARATOR, -1, -1, 0, 0, 0, -1, txt, 6, dummy_hbm,
OK );
1727 MFT_SEPARATOR, 0, 0, 0, 0, 0, 0,
NULL, 4,
NULL,
1730 TMII_INSMI(
MIIM_FTYPE|
MIIM_STRING|
MIIM_BITMAP,
MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, txt, 6, dummy_hbm,
OK );
1732 MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0,
NULL, 4,
NULL,
1735 TMII_INSMI(
MIIM_FTYPE|
MIIM_STRING|
MIIM_BITMAP,
MFT_SEPARATOR|
MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, txt, 6, dummy_hbm,
OK );
1737 MFT_SEPARATOR|
MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0,
NULL, 4,
NULL,
1741 TMII_INSMI(
MIIM_TYPE|
MIIM_DATA,
MFT_STRING|
MFT_OWNERDRAW, -1, -1, 0, 0, 0, 343, txt, 0, 0,
OK );
1743 MFT_STRING|
MFT_OWNERDRAW, 0, 0, 0, 0, 0, 343, 0, 0, 0,
1746 TMII_INSMI(
MIIM_TYPE|
MIIM_DATA,
MFT_STRING|
MFT_OWNERDRAW, -1, -1, 0, 0, 0, 343, txt, 0, 0,
OK );
1748 MFT_STRING|
MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1751 TMII_INSMI(
MIIM_TYPE,
MFT_STRING|
MFT_OWNERDRAW, -1, -1, 0, 0, 0, 343, txt, 0, 0,
OK );
1753 MFT_STRING|
MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1757 TMII_INSMI(
MIIM_TYPE,
MFT_STRING, -2, -2, 0, 0, 0, -2, txt, -2, 0,
OK );
1758 TMII_SMII (
MIIM_TYPE,
MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, 0, 0, 0 );
1760 MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0,
string, 4, 0,
1764 TMII_INSMI(
MIIM_STRING,
MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 0, 0,
OK );
1767 MFT_STRING, 0, 0, submenu, 0, 0, 0,
string, 4, 0,
1770 MFT_STRING, 0, 0, 0, 0, 0, 0,
string, 4, 0,
1774 TMII_INSMI(
MIIM_STRING|
MIIM_FTYPE,
MFT_STRING, -1, -1, 0, 0, 0, -1,
NULL, 0, 0,
OK );
1775 TMII_SMII(
MIIM_STRING, 0, 0, 0, 0, 0, 0, 0, txt, 0, 0 );
1777 MFT_SEPARATOR, 0, 0, 0, 0, 0, 0,
string, 4, 0,
1781 TMII_INSMI(
MIIM_STRING|
MIIM_FTYPE,
MFT_STRING, -1, -1, 0, 0, 0, -1,
NULL, 0, 0,
OK );
1782 TMII_SMII(
MIIM_BITMAP, 0, 0, 0, 0, 0, 0, 0, 0, 0,
hbm );
1784 MFT_SEPARATOR, 0, 0, 0, 0, 0, 0,
string, 80,
hbm,
1793 MFT_BITMAP |
MFT_RIGHTJUSTIFY, 0, 0, 0, 0, 0, 0,
HBMMENU_MBAR_CLOSE, 0,
HBMMENU_MBAR_CLOSE,
1797 TMII_INSMI(
MIIM_TYPE,
MFT_BITMAP |
MFT_MENUBARBREAK |
MFT_RADIOCHECK |
MFT_RIGHTJUSTIFY |
MFT_RIGHTORDER, -1, -1, 0, 0, 0, -1,
hbm, -1, 0,
OK );
1799 MFT_BITMAP |
MFT_MENUBARBREAK |
MFT_RADIOCHECK |
MFT_RIGHTJUSTIFY |
MFT_RIGHTORDER, 0, 0, 0, 0, 0, 0,
hbm, 0,
hbm,
1803 TMII_INSMI(
MIIM_TYPE,
MFT_BITMAP, -1, -1, 0, 0, 0, -1,
hbm, -1, 0,
OK );
1804 TMII_SMII(
MIIM_STATE, -1,
MFS_CHECKED |
MFS_DEFAULT |
MFS_GRAYED |
MFS_HILITE, 0, 0, 0, 0, 0, 0, 0, 0 );
1806 0,
MFS_CHECKED |
MFS_DEFAULT |
MFS_GRAYED |
MFS_HILITE, 0, 0, 0, 0, 0, 0, 80, 0,
1810 TMII_INSMI(
MIIM_TYPE,
MFT_BITMAP, -1, -1, 0, 0, 0, -1,
hbm, -1, 0,
OK );
1811 TMII_SMII(
MIIM_CHECKMARKS,
MFT_RADIOCHECK, 0, 0, 0,
hbm,
hbm, 0, 0, 0, 0 );
1813 MFT_BITMAP, 0, 0, 0,
hbm,
hbm, 0,
hbm, 0,
hbm,
1817 TMII_INSMI(
MIIM_TYPE,
MFT_BITMAP, -1, -1, 0, 0, 0, -1,
hbm, -1, 0,
OK );
1818 TMII_SMII(
MIIM_FTYPE,
MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, (
HBITMAP)0x1234, 0, 0 );
1820 MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, 0, 80, 0,
1823 MFT_BITMAP |
MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0,
hbm, 0,
hbm,
1826 MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, 0, 80, 0,
1828 TMII_SMII(
MIIM_BITMAP, 0, 0, 0, 0, 0, 0, 0, 0, 0,
NULL );
1830 MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0,
NULL, 0,
NULL,
1839 MFT_BITMAP |
MFT_RIGHTJUSTIFY, 0, 0, 0, 0, 0, 0,
HBMMENU_MBAR_CLOSE, 0,
HBMMENU_MBAR_CLOSE,
1843 TMII_INSMI(
MIIM_TYPE,
MFT_BITMAP |
MFT_MENUBARBREAK |
MFT_RADIOCHECK |
MFT_RIGHTJUSTIFY |
MFT_RIGHTORDER, -1, -1, 0, 0, 0, -1,
hbm, -1, 0,
OK );
1845 MFT_BITMAP |
MFT_MENUBARBREAK |
MFT_RADIOCHECK |
MFT_RIGHTJUSTIFY |
MFT_RIGHTORDER, 0, 0, 0, 0, 0, 0,
hbm, 0,
hbm,
1849 TMII_INSMI(
MIIM_TYPE,
MFT_BITMAP, -1, -1, 0, 0, 0, -1,
hbm, -1, 0,
OK );
1850 TMII_SMII(
MIIM_STATE, -1,
MFS_CHECKED |
MFS_DEFAULT |
MFS_GRAYED |
MFS_HILITE, 0, 0, 0, 0, 0, 0, 0, 0 );
1852 0,
MFS_CHECKED |
MFS_DEFAULT |
MFS_GRAYED |
MFS_HILITE, 0, 0, 0, 0, 0, 0, 80, 0,
1856 TMII_INSMI(
MIIM_TYPE,
MFT_BITMAP, -1, -1, 0, 0, 0, -1,
hbm, -1, 0,
OK );
1857 TMII_SMII(
MIIM_CHECKMARKS,
MFT_RADIOCHECK, 0, 0, 0,
hbm,
hbm, 0, 0, 0, 0 );
1859 MFT_BITMAP, 0, 0, 0,
hbm,
hbm, 0,
hbm, 0,
hbm,
1863 TMII_INSMI(
MIIM_TYPE,
MFT_BITMAP, -1, -1, 0, 0, 0, -1,
hbm, -1, 0,
OK );
1864 TMII_SMII(
MIIM_FTYPE,
MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, (
HBITMAP)0x1234, 0, 0 );
1866 MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, 0, 80, 0,
1869 MFT_BITMAP |
MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0,
hbm, 0,
hbm,
1872 MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, 0, 80, 0,
1874 TMII_SMII(
MIIM_BITMAP, 0, 0, 0, 0, 0, 0, 0, 0, 0,
NULL );
1876 MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0,
NULL, 0,
NULL,
1879 }
while( !(ansi = !ansi) );
1895 static CHAR menuitem[] =
"MenuItem",
1896 menuitem2[] =
"MenuItem 2";
1905 strcpy(strIn,
"Case 1 MenuItem");
1906 info.dwTypeData = strIn;
1910 ok (rc,
"Inserting the menuitem failed\n");
1913 ok (
id == 0x1234,
"Getting the menuitem id failed(gave %x)\n",
id);
1920 info.dwTypeData = strback;
1921 info.cch =
sizeof(strback);
1924 ok (rc,
"Getting the menu items info failed\n");
1925 ok (
info.wID == 0x1234,
"IDs differ for the menuitem\n");
1926 ok (!
strcmp(
info.dwTypeData,
"Case 1 MenuItem"),
"Returned item has wrong label\n");
1933 info.dwTypeData = strback;
1934 info.cch =
sizeof(strback);
1937 ok (rc,
"Getting the menu items info failed\n");
1938 ok (
info.wID == 0x1234,
"IDs differ for the menuitem\n");
1939 ok (!
strcmp(
info.dwTypeData,
"Case 1 MenuItem"),
"Returned item has wrong label\n");
1947 strcpy(strIn,
"Case 2 SubMenu");
1949 ok (rc,
"Inserting the popup menu into the main menu failed\n");
1952 ok (
id == -1,
"Getting the menuitem id unexpectedly worked (gave %x)\n",
id);
1959 info.dwTypeData = strback;
1960 info.cch =
sizeof(strback);
1961 info.wID = 0xdeadbeef;
1964 ok (rc,
"Getting the menu items info failed\n");
1965 ok (
info.wID == (
UINT_PTR)hmenuSub,
"IDs differ for the menuitem\n");
1966 ok (!
strcmp(
info.dwTypeData,
"Case 2 SubMenu"),
"Returned item has wrong label\n");
1973 info.dwTypeData = strback;
1974 info.cch =
sizeof(strback);
1977 ok (rc,
"Getting the menu items info failed\n");
1978 ok (
info.wID == (
UINT_PTR)hmenuSub,
"IDs differ for the popup menu\n");
1979 ok (!
strcmp(
info.dwTypeData,
"Case 2 SubMenu"),
"Returned item has wrong label\n");
1988 strcpy(strIn,
"Case 2 MenuItem 1");
1989 info.dwTypeData = strIn;
1992 ok (rc,
"Inserting the menuitem failed\n");
1999 info.dwTypeData = strback;
2000 info.cch =
sizeof(strback);
2003 ok (rc,
"Getting the menu items info failed\n");
2004 ok (
info.wID == (
UINT_PTR)hmenuSub,
"IDs differ for the popup menu\n");
2005 ok (!
strcmp(
info.dwTypeData,
"Case 2 MenuItem 1"),
"Returned item has wrong label (%s)\n",
info.dwTypeData);
2014 strcpy(strIn,
"Case 2 MenuItem 2");
2015 info.dwTypeData = strIn;
2018 ok (rc,
"Inserting the menuitem failed\n");
2025 info.dwTypeData = strback;
2026 info.cch =
sizeof(strback);
2029 ok (rc,
"Getting the menu items info failed\n");
2030 ok (
info.wID == (
UINT_PTR)hmenuSub,
"IDs differ for the popup menu\n");
2031 ok (!
strcmp(
info.dwTypeData,
"Case 2 MenuItem 2"),
"Returned item has wrong label (%s)\n",
info.dwTypeData);
2048 info.dwTypeData = menuitem;
2052 ok (rc,
"Inserting the popup menu into the main menu failed\n");
2055 ok (rc,
"Inserting the sub menu menuitem failed\n");
2061 info.dwTypeData = menuitem2;
2065 ok (rc,
"Inserting the sub menu menuitem 2 failed\n");
2069 ok (
id == -1,
"Getting the sub menu id should have failed because it's a popup (gave %x)\n",
id);
2076 info.dwTypeData = strback;
2077 info.cch =
sizeof(strback);
2080 ok (rc,
"Getting the menus info failed\n");
2081 ok (
info.wID == (
UINT_PTR)hmenuSub,
"IDs differ for popup menu\n");
2082 ok (!
strcmp(
info.dwTypeData,
"MenuItem"),
"Returned item has wrong label (%s)\n",
info.dwTypeData);
2095 ok (rc,
"Inserting the popup menu into the main menu failed\n");
2098 ok (rc,
"Inserting the popup menu into the main menu failed\n");
2104 info.dwTypeData = menuitem;
2108 ok (rc,
"Inserting the sub menu menuitem failed\n");
2114 info.dwTypeData = menuitem2;
2118 ok (rc,
"Inserting the sub menu menuitem 2 failed\n");
2125 info.dwTypeData = strback;
2126 info.cch =
sizeof(strback);
2129 ok (rc,
"Getting the menus info failed\n");
2130 ok (
info.wID == (
UINT_PTR)hmenuSub,
"IDs differ for popup menu\n");
2131 ok (!
strcmp(
info.dwTypeData,
"MenuItem"),
"Returned item has wrong label (%s)\n",
info.dwTypeData);
2137 info.dwTypeData = strback;
2138 info.cch =
sizeof(strback);
2141 ok (rc,
"Getting the menus info failed\n");
2142 ok (
info.wID == (
UINT_PTR)hmenuSub2,
"IDs differ for popup menu\n");
2143 ok (!
strcmp(
info.dwTypeData,
"Submenu2"),
"Returned item has wrong label (%s)\n",
info.dwTypeData);
2160 ok (rc,
"Appending the popup menu to the main menu failed\n");
2163 ok (rc,
"Appending the item to the popup menu failed\n");
2171 ok(rc,
"Setting the ID for the popup menu failed\n");
2176 ok(rc,
"Getting the ID for the popup menu failed\n");
2177 ok(
info.wID == 101,
"The ID for the popup menu has not been set\n");
2184 info.dwTypeData = strback;
2185 info.cch =
sizeof(strback);
2188 ok (rc,
"Getting the menu info failed\n");
2189 ok (
info.wID == 101,
"IDs differ\n");
2190 ok (!
strcmp(
info.dwTypeData,
"Submenu"),
"Returned item has wrong label (%s)\n",
info.dwTypeData);
2197 info.dwTypeData = strback;
2198 info.cch =
sizeof(strback);
2201 ok (rc,
"Getting the menu info failed\n");
2202 ok (
info.wID == 102,
"IDs differ\n");
2203 ok (!
strcmp(
info.dwTypeData,
"Item"),
"Returned item has wrong label (%s)\n",
info.dwTypeData);
2264 i[0].u.ki.wVk =
i[1].u.ki.wVk = wVk;
2282 i[0].u.mi.dx =
i[1].u.mi.dx =
i[2].u.mi.dx
2283 = ((
r.left + 5) * 65535) / screen_w;
2284 i[0].u.mi.dy =
i[1].u.mi.dy =
i[2].u.mi.dy
2285 = ((
r.top + 5) * 65535) / screen_h;
2286 i[0].u.mi.dwFlags =
i[1].u.mi.dwFlags =
i[2].u.mi.dwFlags
2322 if (elapsed > 1000)
break;
2330 skip(
"test %u: failed to send input\n",
i );
2346 skip(
"test %u: didn't receive input\n",
i );
2370 case WM_UNINITMENUPOPUP:
2393 ok(br,
"msg %x: GetMenuBarInfo failed\n",
msg);
2395 ok(!mbi.
hwndMenu,
"msg %x: GetMenuBarInfo.hwndMenu wrong: %p expected NULL\n",
2397 ok(mbi.
hMenu ==
hmenu,
"msg %x: GetMenuBarInfo got wrong menu: %p expected %p\n",
2406 ok(br,
"msg %x: GetMenuBarInfo failed\n",
msg);
2411 "msg %x: GetMenuBarInfo.hwndMenu wrong: %p expected %sNULL\n",
2413 ok(mbi.
hMenu ==
hmenu,
"msg %x: GetMenuBarInfo got wrong menu: %p expected %p\n",
2418 "msg %x: GetMenuBarInfo.fFocused (%d) is wrong\n",
msg, mbi.
fFocused != 0);
2424 else if (
msg == WM_UNINITMENUPOPUP)
2449 ok (aclass,
"MenuTest class not created\n");
2450 if (!aclass)
return;
2454 ok (
hWnd !=
NULL,
"MenuTest window not created\n");
2490 HMENU hMenu, hPopupMenu;
2503 "AppendMenu should accept MF_HILITE\n");
2505 "InsertMenu should accept MF_HILITE\n");
2507 "ModifyMenu should accept MF_HILITE\n");
2510 "AppendMenu must not accept MF_DEFAULT\n");
2512 "InsertMenu must not accept MF_DEFAULT\n");
2514 "ModifyMenu must not accept MF_DEFAULT\n");
2521 HMENU hMenu, hPopupMenu;
2537 ok (aclass,
"HiliteMenuTest class could not be created\n");
2538 if (!aclass)
return;
2542 ok (
hWnd !=
NULL,
"HiliteMenuTest window could not be created\n");
2559 "HiliteMenuItem: Item 2 is hilited\n");
2565 "HiliteMenuItem: call should have failed.\n");
2569 "HiliteMenuItem: expected error ERROR_INVALID_WINDOW_HANDLE, got: %d\n",
GetLastError());
2573 "HiliteMenuItem: call should have failed.\n");
2576 "HiliteMenuItem: expected error ERROR_INVALID_MENU_HANDLE, got: %d\n",
GetLastError());
2579 "HiliteMenuItem: Item 2 is hilited\n");
2585 "HiliteMenuItem: call should have succeeded.\n");
2587 "HiliteMenuItem: expected error 0xdeadbeef, got: %d\n",
GetLastError());
2590 "HiliteMenuItem: Item 2 is hilited\n");
2596 "HiliteMenuItem: call should have succeeded.\n");
2599 "HiliteMenuItem: expected error 0xdeadbeef, got: %d\n",
GetLastError());
2602 "HiliteMenuItem: Item 2 is hilited\n");
2608 "HiliteMenuItem: call should not have failed.\n");
2610 "HiliteMenuItem: expected error 0xdeadbeef, got: %d\n",
GetLastError());
2615 "HiliteMenuItem: Item 2 is not hilited\n");
2622 "HiliteMenuItem: call should not have failed.\n");
2624 "HiliteMenuItem: expected error 0xdeadbeef, got: %d\n",
GetLastError());
2627 "HiliteMenuItem: Item 2 is hilited\n");
2633 "HiliteMenuItem: call should not have failed.\n");
2635 "HiliteMenuItem: expected error 0xdeadbeef, got: %d\n",
GetLastError());
2640 "HiliteMenuItem: Item 3 is not hilited\n");
2647 "HiliteMenuItem: call should not have failed.\n");
2649 "HiliteMenuItem: expected error 0xdeadbeef, got: %d\n",
GetLastError());
2652 "HiliteMenuItem: Item 3 is hilited\n");
2663 ok (
count != -1,
"GetMenuItemCount returned -1\n");
2670 memset(&mii, 0,
sizeof(mii));
2671 mii.
cbSize =
sizeof(mii);
2674 ok(
ret,
"GetMenuItemInfo(%u) failed\n",
i);
2677 trace(
"item #%u: fType %04x, fState %04x, wID %u, hSubMenu %p\n",
2686 ok(mii.
fType == checked_type,
"id %u: expected fType %04x, got %04x\n", checked_cmd, checked_type, mii.
fType);
2687 ok(mii.
fState == checked_state,
"id %u: expected fState %04x, got %04x\n", checked_cmd, checked_state, mii.
fState);
2693 if (mii.
wID == checked_cmd)
2695 ok(mii.
fType == checked_type,
"id %u: expected fType %04x, got %04x\n", checked_cmd, checked_type, mii.
fType);
2696 ok(mii.
fState == checked_state,
"id %u: expected fState %04x, got %04x\n", checked_cmd, checked_state, mii.
fState);
2697 ok(mii.
wID != 0,
"id %u: not expected wID 0\n", checked_cmd);
2706 ok(mii.
wID == 0,
"id %u: expected wID 0, got %u\n", checked_cmd, mii.
wID);
2710 ok(mii.
fState == 0,
"id %u: expected fState 0, got %04x\n", checked_cmd, mii.
fState);
2711 ok(mii.
wID != 0,
"id %u: not expected wID 0\n", checked_cmd);
2723 memset(&mii, 0,
sizeof(mii));
2724 mii.
cbSize =
sizeof(mii);
2727 ok(
ret,
"SetMenuItemInfo(%u) failed\n",
id);
2741 ok(
ret,
"CheckMenuRadioItem failed\n");
2746 ok(!
ret,
"CheckMenuRadioItem should return FALSE\n");
2755 ok(!
ret,
"CheckMenuRadioItem should return FALSE\n");
2759 ok(
ret,
"CheckMenuRadioItem failed\n");
2764 ok(!
ret,
"CheckMenuRadioItem should return FALSE\n");
2773 ok(!
ret,
"CheckMenuRadioItem should return FALSE\n");
2818 ok(
ret,
"AppendMenu failed\n");
2820 ok(
ret,
"AppendMenu failed\n");
2822 ok(
ret,
"AppendMenu failed\n");
2833 memset(&mii, 0,
sizeof(mii));
2834 mii.
cbSize =
sizeof(mii);
2839 ok(
ret,
"GetMenuItemInfo(%u) failed\n",
i);
2841 trace(
"item #%u: fType %04x, fState %04x, wID %u, dwTypeData %s\n",
2874 for (
i = 0;
i < item_count;
i++)
2878 ok(
ret,
"%d: AppendMenu(%04x, %04x, %p) error %u\n",
2897 for (
i = 0;
i < item_count;
i++)
2920 ok(
ret,
"%d: InsertMenuItem(%04x, %04x, %p) error %u\n",
2932 ok(
count == item_count,
"expected %d, got %d menu items\n",
count, item_count);
2939 memset(&mii, 0,
sizeof(mii));
2940 mii.
cbSize =
sizeof(mii);
2945 ok(
ret,
"GetMenuItemInfo(%u) failed\n",
i);
2948 trace(
"item #%u: fType %04x, fState %04x, wID %04x, hbmp %p\n",
2952 "%u: expected fType %04x, got %04x\n",
i,
item[
i].type, mii.
fType);
2954 "%u: expected wID %04x, got %04x\n",
i,
item[
i].id, mii.
wID);
2955 if (mii.hbmpItem || !