mirror of
https://github.com/reactos/wine.git
synced 2024-11-29 14:40:56 +00:00
user32: Don't truncate bitmap ids in InsertMenu.
This commit is contained in:
parent
6b0d9ff1cd
commit
33ba7c07fb
@ -3816,7 +3816,7 @@ static void MENU_mnu2mnuii( UINT flags, UINT_PTR id, LPCWSTR str,
|
||||
pmii->dwTypeData = (LPWSTR)str;
|
||||
} else if( flags & MFT_BITMAP){
|
||||
pmii->fMask |= MIIM_BITMAP | MIIM_STRING;
|
||||
pmii->hbmpItem = ULongToHandle(LOWORD(str));
|
||||
pmii->hbmpItem = (HBITMAP)str;
|
||||
}
|
||||
if( flags & MF_OWNERDRAW){
|
||||
pmii->fMask |= MIIM_DATA;
|
||||
|
@ -404,6 +404,7 @@ static void test_menu_ownerdraw(void)
|
||||
int i,j,k;
|
||||
BOOL ret;
|
||||
HMENU hmenu;
|
||||
MENUITEMINFO mii;
|
||||
LONG leftcol;
|
||||
HWND hwnd = CreateWindowEx(0, MAKEINTATOM(atomMenuCheckClass), NULL,
|
||||
WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 200, 200,
|
||||
@ -463,6 +464,18 @@ static void test_menu_ownerdraw(void)
|
||||
"Height is incorrect. Got %d expected %d\n",
|
||||
MOD_rc[0].bottom - MOD_rc[0].top, MOD_SIZE);
|
||||
|
||||
/* test owner-drawn callback bitmap */
|
||||
ModifyMenu( hmenu, 1, MF_BYPOSITION | MFT_BITMAP, 1, (LPCSTR)HBMMENU_CALLBACK );
|
||||
mii.cbSize = sizeof(mii);
|
||||
mii.fMask = MIIM_BITMAP | MIIM_FTYPE | MIIM_ID;
|
||||
if (GetMenuItemInfoA( hmenu, 1, TRUE, &mii ))
|
||||
{
|
||||
ok( mii.fType == MFT_BITMAP, "wrong type %x\n", mii.fType );
|
||||
ok( mii.wID == 1, "wrong id %x\n", mii.wID );
|
||||
ok( mii.hbmpItem == HBMMENU_CALLBACK, "wrong data %p\n", mii.hbmpItem );
|
||||
}
|
||||
TrackPopupMenu( hmenu, TPM_RETURNCMD, 100,100, 0, hwnd, NULL);
|
||||
|
||||
/* test width/height of an ownerdraw menu bar as well */
|
||||
ret = DestroyMenu(hmenu);
|
||||
ok(ret, "DestroyMenu failed with error %d\n", GetLastError());
|
||||
|
Loading…
Reference in New Issue
Block a user