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 || !
item[
i].str)
2960 "%u: expected hbmpItem %p, got %p\n",
i,
item[
i].
str, mii.hbmpItem);
3045#define create_menu(a) create_menu_from_data((a), ARRAY_SIZE(a))
3046#define create_menuitem(a) create_menuitem_from_data((a), ARRAY_SIZE(a))
3047#define compare_menu(h, a) compare_menu_data((h), (a), ARRAY_SIZE(a))
3083#undef create_menuitem
3101 ok( !
ret,
"GetMenuInfo() should have failed\n");
3103 broken(gle == 0xdeadbeef),
3109 ok( !
ret,
"GetMenuInfo() should have failed\n");
3111 broken(gle == 0xdeadbeef),
3117 ok(
ret,
"GetMenuInfo() should have succeeded\n");
3118 ok( gle == 0xdeadbeef,
"GetMenuInfo() error got %u\n", gle);
3123 ok( !
ret,
"GetMenuInfo() should have failed\n");
3125 broken(gle == 0xdeadbeef),
3153 ok( !
ret,
"SetMenuInfo() should have failed\n");
3155 broken(gle == 0xdeadbeef),
3161 ok( !
ret,
"SetMenuInfo() should have failed\n");
3163 broken(gle == 0xdeadbeef),
3169 ok(
ret,
"SetMenuInfo() should have succeeded\n");
3170 ok( gle == 0xdeadbeef,
"SetMenuInfo() error got %u\n", gle);
3175 ok( !
ret,
"SetMenuInfo() should have failed\n");
3177 broken(gle == 0xdeadbeef),
3183 mi.fMask = MIM_STYLE;
3186 ok(
ret,
"GetMenuInfo() should have succeeded\n");
3187 ok( gle == 0xdeadbeef,
"GetMenuInfo() error got %u\n", gle);
3188 ok( !(
mi.dwStyle &
MNS_CHECKORBMP),
"menustyle was not expected to have the MNS_CHECKORBMP flag\n");
3191 mi.fMask = MIM_STYLE;
3194 ok(
ret,
"GetMenuInfo() should have succeeded\n");
3195 ok( gle == 0xdeadbeef,
"GetMenuInfo() error got %u\n", gle);
3196 ok( !(
mi.dwStyle &
MNS_CHECKORBMP),
"menustyle was not expected to have the MNS_CHECKORBMP flag\n");
3200 mi.fMask = MIM_STYLE | MIM_APPLYTOSUBMENUS;
3204 ok(
ret,
"SetMenuInfo() should have succeeded\n");
3205 ok( gle == 0xdeadbeef,
"SetMenuInfo() error got %u\n", gle);
3209 mi.fMask = MIM_STYLE;
3212 ok(
ret,
"GetMenuInfo() should have succeeded\n");
3213 ok( gle == 0xdeadbeef,
"GetMenuInfo() error got %u\n", gle);
3214 ok(
mi.dwStyle &
MNS_CHECKORBMP,
"menustyle was expected to have the MNS_CHECKORBMP flag\n");
3217 mi.fMask = MIM_STYLE;
3220 ok(
ret,
"GetMenuInfo() should have succeeded\n");
3221 ok( gle == 0xdeadbeef,
"GetMenuInfo() error got %u\n", gle);
3222 ok(
mi.dwStyle &
MNS_CHECKORBMP,
"menustyle was expected to have the MNS_CHECKORBMP flag\n");
3226 mi.fMask = MIM_STYLE ;
3230 ok(
ret,
"SetMenuInfo() should have succeeded\n");
3231 ok( gle == 0xdeadbeef,
"SetMenuInfo() error got %u\n", gle);
3235 mi.fMask = MIM_STYLE;
3238 ok(
ret,
"GetMenuInfo() should have succeeded\n");
3239 ok( gle == 0xdeadbeef,
"GetMenuInfo() error got %u\n", gle);
3240 ok(
mi.dwStyle &
MNS_NOCHECK,
"menustyle was expected to have the MNS_NOCHECK flag\n");
3243 mi.fMask = MIM_STYLE;
3246 ok(
ret,
"GetMenuInfo() should have succeeded\n");
3247 ok( gle == 0xdeadbeef,
"GetMenuInfo() error got %u\n", gle);
3248 ok( !(
mi.dwStyle &
MNS_NOCHECK),
"menustyle was not expected to have the MNS_NOCHECK flag\n");
3252 mi.fMask = MIM_BACKGROUND;
3254 ok(
ret,
"GetMenuInfo() should have succeeded\n" );
3255 ok(
mi.hbrBack ==
NULL,
"got %p\n",
mi.hbrBack );
3260 ok(
ret,
"SetMenuInfo() should have succeeded\n" );
3263 ok(
ret,
"GetMenuInfo() should have succeeded\n" );
3264 ok(
mi.hbrBack == brush,
"got %p original %p\n",
mi.hbrBack, brush );
3268 ok(
ret,
"SetMenuInfo() should have succeeded\n" );
3270 ok(
ret,
"GetMenuInfo() should have succeeded\n" );
3271 ok(
mi.hbrBack ==
NULL,
"got %p\n",
mi.hbrBack );
3305 for( Ex = 0; Ex < 2; Ex++)
3321 ok( !
ret,
"TrackPopupMenu%s should have failed\n", Ex ?
"Ex" :
"");
3323 ||
broken (gle == 0xdeadbeef)
3325 ,
"TrackPopupMenu%s error got %u expected %u\n",
3328 "got unexpected message(s)%s%s%s\n",
3337 ok( !
ret,
"TrackPopupMenu%s should have failed\n", Ex ?
"Ex" :
"");
3339 ||
broken (gle == 0xdeadbeef)
3341 ,
"TrackPopupMenu%s error got %u expected %u\n",
3344 "got unexpected message(s)%s%s%s\n",
3354 ok( !
ret,
"TrackPopupMenu%s should have failed\n", Ex ?
"Ex" :
"");
3357 "got unexpected message(s)%s%s%s\n",
3367 ok(
ret == 0,
"TrackPopupMenu%s returned %d expected zero\n", Ex ?
"Ex" :
"",
ret);
3370 ||
broken (gle == 0xdeadbeef)
3371 ,
"TrackPopupMenu%s error got %u expected %u or %u\n",
3374 "missed expected message(s)%s%s%s\n",
3380 ok(
ret,
"AppendMenA has failed!\n");
3385 ok(
ret == 0,
"TrackPopupMenu%s returned %d expected zero\n", Ex ?
"Ex" :
"",
ret);
3388 ||
broken (gle == 0xdeadbeef)
3389 ,
"TrackPopupMenu%s error got %u expected %u or %u\n",
3392 "missed expected message(s)%s%s%s\n",
3443 ok(
ret,
"AppendMenu failed.\n");
3445 ok(
ret,
"AppendMenu failed.\n");
3483 HMENU menu, menubar;
3493 "CreateWindowEx failed with error %d\n",
GetLastError());
3535 ok(
ret == 0,
"Sending WM_SYSCOMMAND/SC_KEYMENU failed lasterror is %u\n",
GetLastError());
3558 if( !hmenus[
i])
break;
3560 ok(
i ==
NR_MENUS,
"could not create more than %d menu's\n",
i);
3565 trace(
"Maximum depth is %d\n",
i);
3569 "no ( or very large) limit on menu depth!\n");
3583 ok( menu1 && menu2,
"error creating menus.\n");
3595 "ModifyMenu should have failed.\n");
3617 skip(
"interactive alignment tests.\n");
3622 "Menu text alignment Test\nPlease make a selection.",
3629 memset( bmfill, 0xcc,
sizeof( bmfill));
3633 ok( hbm1 && hbm2 && hbm3,
"Creating bitmaps failed\n");
3635 ok( menu !=
NULL,
"CreatePopupMenu() failed\n");
3637 mi.fMask = MIM_STYLE;
3640 ok( menu !=
NULL,
"GetMenuInfo() failed\n");
3641 ok( 0 ==
mi.dwStyle,
"menuinfo style is %x\n",
mi.dwStyle);
3646 mii.hbmpItem = hbm1;
3647 mii.
dwTypeData = (
LPSTR)
" OK: menu texts are correctly left-aligned.";
3649 ok(
ret,
"InsertMenuItem() failed\n");
3652 mii.hbmpItem = hbm2;
3655 ok(
ret,
"InsertMenuItem() failed\n");
3657 ok(
ret != 2,
"User indicated that menu text alignment test 1 failed %d\n",
ret);
3661 mii.hbmpItem = hbm3;
3664 ok(
ret,
"InsertMenuItem() failed\n");
3667 mii.hbmpItem = hbm1;
3670 mii.
dwTypeData = (
LPSTR)
" OK: menu texts are to the right of the bitmaps........";
3672 ok(
ret,
"SetMenuItemInfo() failed\n");
3674 mii.hbmpItem = hbm2;
3675 mii.
dwTypeData = (
LPSTR)
" FAIL: menu texts are below the first bitmap. ";
3677 ok(
ret,
"SetMenuItemInfo() failed\n");
3679 ok(
ret != 2,
"User indicated that menu text alignment test 2 failed %d\n",
ret);
3686 ok(
ret,
"SetMenuItemInfo() failed\n");
3689 mii.hbmpItem =
NULL;
3692 ok(
ret,
"SetMenuItemInfo() failed\n");
3694 mii.hbmpItem =
NULL;
3695 mii.
dwTypeData = (
LPSTR)
" FAIL: menu texts are NOT below the bitmap.";
3697 ok(
ret,
"SetMenuItemInfo() failed\n");
3699 ok(
ret != 2,
"User indicated that menu text alignment test 3 failed %d\n",
ret);
3719 ok(
ret,
"AppendMenu failed.\n");
3721 ok(
ret,
"AppendMenu failed.\n");
3816 static char string[] =
"string";
3824 ok(
hmenu != 0,
"CreateMenu failed\n");
3826 ok(
ret,
"AppendMenu failed\n");
3831 ok(
hmenu != 0,
"CreateMenu failed\n");
3834 ok(
ret,
"AppendMenu failed\n");
3839 ok(
hmenu != 0,
"CreateMenu failed\n");
3842 ok(
ret,
"AppendMenu failed\n");
3847 ok(
hmenu != 0,
"CreateMenu failed\n");
3849 ok(hsubmenu != 0,
"CreateMenu failed\n");
3851 ok(
ret,
"AppendMenu failed\n");
3857 ok(
hmenu != 0,
"CreateMenu failed\n");
3859 ok(hsubmenu != 0,
"CreateMenu failed\n");
3861 ok(
ret,
"AppendMenu failed\n");
3867 ok(
hmenu != 0,
"CreateMenu failed\n");
3869 ok(hsubmenu != 0,
"CreateMenu failed\n");
3871 ok(
ret,
"AppendMenu failed\n");
3877 ok(
hmenu != 0,
"CreateMenu failed\n");
3879 ok(hsubmenu != 0,
"CreatePopupMenu failed\n");
3881 ok(
ret,
"AppendMenu failed\n");
3887 ok(
hmenu != 0,
"CreateMenu failed\n");
3889 ok(hsubmenu != 0,
"CreatePopupMenu failed\n");
3891 ok(
ret,
"AppendMenu failed\n");
3897 ok(
hmenu != 0,
"CreateMenu failed\n");
3899 ok(hsubmenu != 0,
"CreatePopupMenu failed\n");
3901 ok(
ret,
"AppendMenu failed\n");
3907 ok(
hmenu != 0,
"CreateMenu failed\n");
3909 ok(
ret,
"AppendMenu failed\n");
3913 ok(
ret,
"ModifyMenu failed\n");
3915 memset(&mii, 0,
sizeof(mii));
3916 mii.
cbSize =
sizeof(mii);
3920 ok(!
ret,
"InsertMenuItem should fail\n");
3922 ok(!
ret,
"SetMenuItemInfo should fail\n");
3926 ok(
ret,
"InsertMenuItem failed\n");
3932 ok(
ret,
"SetMenuItemInfo failed\n");
3940 ok(
hmenu != 0,
"CreateMenu failed\n");
3943 memset(&mii, 0,
sizeof(mii));
3944 mii.
cbSize =
sizeof(mii);
3948 mii.hbmpItem =
hbmp;
3950 ok(
ret,
"InsertMenuItem failed\n");
3951 memset(&mii, 0x81,
sizeof(mii));
3953 mii.
cbSize =
sizeof(mii);
3959 ok(
ret,
"GetMenuItemInfo failed\n");
3962 ok(mii.
wID == 0,
"expected 0, got %#x\n", mii.
wID);
3966 ok(mii.
cch == 6,
"expected 6, got %u\n", mii.
cch);
3968 ok(mii.hbmpItem ==
hbmp,
"expected %p, got %p\n",
hbmp, mii.hbmpItem);
3970 memset(&mii, 0x81,
sizeof(mii));
3971 mii.
cbSize =
sizeof(mii);
3975 ok(
ret,
"GetMenuItemInfo failed\n");
3977 ok(mii.
fState == 0x81818181,
"expected 0x81818181, got %#x\n", mii.
fState);
3978 ok(mii.
wID == 0x81818181,
"expected 0x81818181, got %#x\n", mii.
wID);
3982 ok(mii.
cch == 6,
"expected 6, got %u\n", mii.
cch);
3983 ok(mii.hbmpItem ==
hbmp,
"expected %p, got %p\n",
hbmp, mii.hbmpItem);
3985 memset(&mii, 0x81,
sizeof(mii));
3987 mii.
cbSize =
sizeof(mii);
3993 ok(
ret,
"GetMenuItemInfo failed\n");
3996 ok(mii.
wID == 0,
"expected 0, got %#x\n", mii.
wID);
4000 ok(mii.
cch == 6,
"expected 6, got %u\n", mii.
cch);
4001 ok(mii.hbmpItem ==
hbmp,
"expected %p, got %p\n",
hbmp, mii.hbmpItem);
4007 ok(
hmenu != 0,
"CreateMenu failed\n");
4010 memset(&mii, 0,
sizeof(mii));
4011 mii.
cbSize =
sizeof(mii);
4017 ok(
ret,
"InsertMenuItem failed\n");
4018 memset(&mii, 0x81,
sizeof(mii));
4020 mii.
cbSize =
sizeof(mii);
4026 ok(
ret,
"GetMenuItemInfo failed\n");
4029 ok(mii.
wID == 0,
"expected 0, got %#x\n", mii.
wID);
4033 ok(mii.
cch == 6,
"expected 6, got %u\n", mii.
cch);
4037 memset(&mii, 0x81,
sizeof(mii));
4038 mii.
cbSize =
sizeof(mii);
4044 ok(
ret,
"GetMenuItemInfo failed\n");
4046 ok(mii.
fState == 0x81818181,
"expected 0x81818181, got %#x\n", mii.
fState);
4047 ok(mii.
wID == 0x81818181,
"expected 0x81818181, got %#x\n", mii.
wID);
4051 ok(mii.
cch == 6,
"expected 6, got %u\n", mii.
cch);
4055 memset(&mii, 0x81,
sizeof(mii));
4057 mii.
cbSize =
sizeof(mii);
4063 ok(
ret,
"GetMenuItemInfo failed\n");
4066 ok(mii.
wID == 0,
"expected 0, got %#x\n", mii.
wID);
4070 ok(mii.
cch == 6,
"expected 6, got %u\n", mii.
cch);
4078 ok(
hmenu != 0,
"CreateMenu failed\n");
4081 memset(&mii, 0,
sizeof(mii));
4082 mii.
cbSize =
sizeof(mii);
4087 mii.hbmpItem =
hbmp;
4089 ok(
ret,
"InsertMenuItem failed\n");
4090 memset(&mii, 0x81,
sizeof(mii));
4092 mii.
cbSize =
sizeof(mii);
4098 ok(
ret,
"GetMenuItemInfo failed\n");
4101 ok(mii.
wID == 0,
"expected 0, got %#x\n", mii.
wID);
4105 ok(mii.
cch == 6,
"expected 6, got %u\n", mii.
cch);
4107 ok(mii.hbmpItem == 0,
"expected 0, got %p\n", mii.hbmpItem);
4109 memset(&mii, 0x81,
sizeof(mii));
4111 mii.
cbSize =
sizeof(mii);
4117 ok(
ret,
"GetMenuItemInfo failed\n");
4119 ok(mii.
fState == 0x81818181,
"expected 0x81818181, got %#x\n", mii.
fState);
4120 ok(mii.
wID == 0x81818181,
"expected 0x81818181, got %#x\n", mii.
wID);
4124 ok(mii.
cch == 6,
"expected 6, got %u\n", mii.
cch);
4126 ok(mii.hbmpItem == 0,
"expected 0, got %p\n", mii.hbmpItem);
4134 ok(
hmenu != 0,
"CreateMenu failed\n");
4135 memset(&mii, 0,
sizeof(mii));
4136 mii.
cbSize =
sizeof(mii);
4141 ok(
ret,
"InsertMenuItem failed\n");
4142 memset(&mii, 0x81,
sizeof(mii));
4144 mii.
cbSize =
sizeof(mii);
4150 ok(
ret,
"GetMenuItemInfo failed\n");
4153 ok(mii.
wID == 0,
"expected 0, got %#x\n", mii.
wID);
4157 ok(mii.
cch == 6,
"expected 6, got %u\n", mii.
cch);
4159 ok(mii.hbmpItem == 0,
"expected 0, got %p\n", mii.hbmpItem);
4165 ok(
ret,
"SetMenuItemInfo failed\n");
4166 memset(&mii, 0x81,
sizeof(mii));
4168 mii.
cbSize =
sizeof(mii);
4174 ok(
ret,
"GetMenuItemInfo failed\n");
4177 ok(mii.
wID == 0,
"expected 0, got %#x\n", mii.
wID);
4181 ok(mii.
cch == 6,
"expected 6, got %u\n", mii.
cch);
4185 memset(&mii, 0x81,
sizeof(mii));
4187 mii.
cbSize =
sizeof(mii);
4193 ok(
ret,
"GetMenuItemInfo failed\n");
4195 ok(mii.
fState == 0x81818181,
"expected 0x81818181, got %#x\n", mii.
fState);
4196 ok(mii.
wID == 0x81818181,
"expected 0x81818181, got %#x\n", mii.
wID);
4200 ok(mii.
cch == 6,
"expected 6, got %u\n", mii.
cch);
4206 mii.hbmpItem =
hbmp;
4208 ok(
ret,
"SetMenuItemInfo failed\n");
4209 memset(&mii, 0x81,
sizeof(mii));
4211 mii.
cbSize =
sizeof(mii);
4217 ok(
ret,
"GetMenuItemInfo failed\n");
4220 ok(mii.
wID == 0,
"expected 0, got %#x\n", mii.
wID);
4224 ok(mii.
cch == 6,
"expected 6, got %u\n", mii.
cch);
4226 ok(mii.hbmpItem ==
hbmp,
"expected %p, got %p\n",
hbmp, mii.hbmpItem);
4228 memset(&mii, 0x81,
sizeof(mii));
4230 mii.
cbSize =
sizeof(mii);
4236 ok(
ret,
"GetMenuItemInfo failed\n");
4238 ok(mii.
fState == 0x81818181,
"expected 0x81818181, got %#x\n", mii.
fState);
4239 ok(mii.
wID == 0x81818181,
"expected 0x81818181, got %#x\n", mii.
wID);
4243 ok(mii.
cch == 6,
"expected 6, got %u\n", mii.
cch);
4244 ok(mii.hbmpItem ==
hbmp,
"expected %p, got %p\n",
hbmp, mii.hbmpItem);
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
char * strcpy(char *DstString, const char *SrcString)
char * strchr(const char *String, int ch)
static const char * wine_dbgstr_rect(const RECT *prc)
static const WCHAR empty[]
#define ERROR_INVALID_PARAMETER
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei GLenum type
GLint GLint GLint GLint GLint GLint y
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble r
GLdouble GLdouble GLdouble GLdouble top
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 * u
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 emptyW[]
static const WCHAR testW[]
static const SecPkgInfoW infoW
#define sprintf(buf, format,...)
static const CHAR emptyA[]
static CHAR string2[MAX_PATH]
#define todo_wine_if(is_todo)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
unsigned __int3264 UINT_PTR
#define WS_OVERLAPPEDWINDOW
_Out_opt_ int _Out_opt_ int * cy
#define strncmpW(s1, s2, n)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
#define FIELD_OFFSET(t, f)
INT WINAPI DrawTextA(HDC hdc, LPCSTR str, INT count, LPRECT rect, UINT flags)
UINT WINAPI SendInput(UINT, LPINPUT, int)
DWORD WINAPI GetLastError(void)
#define ERROR_POPUP_ALREADY_ACTIVE
#define ERROR_INVALID_MENU_HANDLE
#define ERROR_INVALID_WINDOW_HANDLE
HGDIOBJ WINAPI GetStockObject(_In_ int)
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
int WINAPI GetObjectA(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
BOOL WINAPI TextOutA(_In_ HDC hdc, _In_ int x, _In_ int y, _In_reads_(c) LPCSTR lpString, _In_ int c)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
BOOL WINAPI GetTextMetricsA(_In_ HDC, _Out_ LPTEXTMETRICA)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
BOOL WINAPI Rectangle(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
BOOL WINAPI GetTextExtentPointA(_In_ HDC hdc, _In_reads_(c) LPCSTR lpString, _In_ int c, _Out_ LPSIZE lpsz)
BOOL WINAPI SetMenuItemInfoA(_In_ HMENU, _In_ UINT, _In_ BOOL, _In_ LPCMENUITEMINFOA)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
LRESULT WINAPI DispatchMessageA(_In_ const MSG *)
#define MOUSEEVENTF_ABSOLUTE
BOOL WINAPI EndMenu(void)
#define SetWindowLongPtrA
HMENU WINAPI CreatePopupMenu(void)
BOOL WINAPI SetMenu(_In_ HWND, _In_opt_ HMENU)
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)
UINT WINAPI GetMenuState(_In_ HMENU, _In_ UINT, _In_ UINT)
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
#define MOUSEEVENTF_LEFTUP
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define HBMMENU_POPUP_RESTORE
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
struct tagMENUITEMINFOA MENUITEMINFOA
int WINAPI GetMenuStringW(_In_ HMENU hMenu, _In_ UINT uIDItem, _Out_writes_opt_(cchMax) LPWSTR lpString, _In_ int cchMax, _In_ UINT flags)
#define HBMMENU_POPUP_MINIMIZE
HMENU WINAPI CreateMenu(void)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
BOOL WINAPI SetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _In_ LPCMENUITEMINFOW)
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HWND WINAPI GetCapture(void)
BOOL WINAPI IsMenu(_In_ HMENU)
#define GetWindowLongPtrA
UINT WINAPI GetMenuItemID(_In_ HMENU, _In_ int)
HBITMAP WINAPI LoadBitmapA(_In_opt_ HINSTANCE, _In_ LPCSTR)
HMENU WINAPI GetSystemMenu(_In_ HWND, _In_ BOOL)
BOOL WINAPI SetCursorPos(_In_ int, _In_ int)
BOOL WINAPI TrackPopupMenuEx(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _In_ HWND, _In_opt_ LPTPMPARAMS)
BOOL WINAPI InsertMenuA(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCSTR)
int WINAPI GetMenuStringA(_In_ HMENU hMenu, _In_ UINT uIDItem, _Out_writes_opt_(cchMax) LPSTR lpString, _In_ int cchMax, _In_ UINT flags)
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
BOOL WINAPI HiliteMenuItem(_In_ HWND, _In_ HMENU, _In_ UINT, _In_ UINT)
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
struct tagMENUBARINFO MENUBARINFO
BOOL WINAPI ModifyMenuA(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCSTR)
#define MOUSEEVENTF_LEFTDOWN
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
BOOL WINAPI InsertMenuItemA(_In_ HMENU, _In_ UINT, _In_ BOOL, _In_ LPCMENUITEMINFOA)
#define HBMMENU_POPUP_CLOSE
BOOL WINAPI DrawMenuBar(_In_ HWND)
HICON WINAPI LoadIconA(_In_opt_ HINSTANCE hInstance, _In_ LPCSTR lpIconName)
BOOL WINAPI RemoveMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
BOOL WINAPI SetMenuInfo(_In_ HMENU, _In_ LPCMENUINFO)
BOOL WINAPI UpdateWindow(_In_ HWND)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI GetMenuInfo(_In_ HMENU, _Inout_ LPMENUINFO)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
BOOL WINAPI AppendMenuA(_In_ HMENU, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCSTR)
LONG WINAPI GetDialogBaseUnits(void)
BOOL WINAPI GetMenuItemRect(_In_opt_ HWND, _In_ HMENU, _In_ UINT, _Out_ LPRECT)
BOOL WINAPI CheckMenuRadioItem(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT, _In_ UINT)
#define HBMMENU_MBAR_CLOSE
#define MAKEINTRESOURCEA(i)
BOOL WINAPI DestroyMenu(_In_ HMENU)
BOOL WINAPI GetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _Inout_ LPMENUITEMINFOW)
BOOL WINAPI PeekMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
BOOL WINAPI GetMenuItemInfoA(_In_ HMENU, _In_ UINT, _In_ BOOL, _Inout_ LPMENUITEMINFOA)
BOOL WINAPI TrackPopupMenu(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _Reserved_ int, _In_ HWND, _Reserved_ LPCRECT)
HMENU WINAPI LoadMenuIndirectA(_In_ const MENUTEMPLATE *)
BOOL WINAPI ModifyMenuW(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCWSTR)
struct tagMENUINFO MENUINFO
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
BOOL WINAPI GetMenuBarInfo(_In_ HWND, _In_ LONG, _In_ LONG, _Inout_ PMENUBARINFO)
BOOL WINAPI PostMessageA(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)
int WINAPI GetSystemMetrics(_In_ int)
HMENU WINAPI GetMenu(_In_ HWND)
BOOL WINAPI InsertMenuItemW(_In_ HMENU, _In_ UINT, _In_ BOOL, _In_ LPCMENUITEMINFOW)
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
HMENU WINAPI LoadMenuA(_In_opt_ HINSTANCE, _In_ LPCSTR)