mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
user32: When converting from MF_ flags to MENUITEMINFO ignore MF_POPUP if id is not a menu.
This commit is contained in:
parent
7744c7003b
commit
c6dbb33e19
@ -3859,7 +3859,7 @@ static void MENU_mnu2mnuii( UINT flags, UINT_PTR id, LPCWSTR str,
|
|||||||
pmii->fMask |= MIIM_DATA;
|
pmii->fMask |= MIIM_DATA;
|
||||||
pmii->dwItemData = (ULONG_PTR) str;
|
pmii->dwItemData = (ULONG_PTR) str;
|
||||||
}
|
}
|
||||||
if( flags & MF_POPUP) {
|
if( flags & MF_POPUP && MENU_GetMenu((HMENU)id)) {
|
||||||
pmii->fMask |= MIIM_SUBMENU;
|
pmii->fMask |= MIIM_SUBMENU;
|
||||||
pmii->hSubMenu = (HMENU)id;
|
pmii->hSubMenu = (HMENU)id;
|
||||||
}
|
}
|
||||||
|
@ -3639,18 +3639,14 @@ static void test_AppendMenu(void)
|
|||||||
hmenu = CreateMenu();
|
hmenu = CreateMenu();
|
||||||
ok(hmenu != 0, "CreateMenu failed\n");
|
ok(hmenu != 0, "CreateMenu failed\n");
|
||||||
ret = AppendMenuA(hmenu, MF_POPUP, 202, "item 1");
|
ret = AppendMenuA(hmenu, MF_POPUP, 202, "item 1");
|
||||||
todo_wine
|
|
||||||
ok(ret, "AppendMenu failed\n");
|
ok(ret, "AppendMenu failed\n");
|
||||||
if (ret) /* FIXME: uncomment once Wine is fixed */
|
|
||||||
check_menu_items(hmenu, 202, MF_STRING, 0);
|
check_menu_items(hmenu, 202, MF_STRING, 0);
|
||||||
DestroyMenu(hmenu);
|
DestroyMenu(hmenu);
|
||||||
|
|
||||||
hmenu = CreateMenu();
|
hmenu = CreateMenu();
|
||||||
ok(hmenu != 0, "CreateMenu failed\n");
|
ok(hmenu != 0, "CreateMenu failed\n");
|
||||||
ret = AppendMenuA(hmenu, MF_OWNERDRAW | MF_POPUP, 203, "item 1");
|
ret = AppendMenuA(hmenu, MF_OWNERDRAW | MF_POPUP, 203, "item 1");
|
||||||
todo_wine
|
|
||||||
ok(ret, "AppendMenu failed\n");
|
ok(ret, "AppendMenu failed\n");
|
||||||
if (ret) /* FIXME: uncomment once Wine is fixed */
|
|
||||||
check_menu_items(hmenu, 203, MF_OWNERDRAW, 0);
|
check_menu_items(hmenu, 203, MF_OWNERDRAW, 0);
|
||||||
DestroyMenu(hmenu);
|
DestroyMenu(hmenu);
|
||||||
|
|
||||||
@ -3720,9 +3716,7 @@ if (ret) /* FIXME: uncomment once Wine is fixed */
|
|||||||
ok(ret, "AppendMenu failed\n");
|
ok(ret, "AppendMenu failed\n");
|
||||||
check_menu_items(hmenu, 204, MF_STRING, 0);
|
check_menu_items(hmenu, 204, MF_STRING, 0);
|
||||||
ret = ModifyMenuA(hmenu, 0, MF_POPUP | MF_BYPOSITION, 205, "item 2");
|
ret = ModifyMenuA(hmenu, 0, MF_POPUP | MF_BYPOSITION, 205, "item 2");
|
||||||
todo_wine
|
|
||||||
ok(ret, "ModifyMenu failed\n");
|
ok(ret, "ModifyMenu failed\n");
|
||||||
if (ret) /* FIXME: uncomment once Wine is fixed */
|
|
||||||
check_menu_items(hmenu, 205, MF_STRING, 0);
|
check_menu_items(hmenu, 205, MF_STRING, 0);
|
||||||
memset(&mii, 0, sizeof(mii));
|
memset(&mii, 0, sizeof(mii));
|
||||||
mii.cbSize = sizeof(mii);
|
mii.cbSize = sizeof(mii);
|
||||||
|
Loading…
Reference in New Issue
Block a user