user.exe16: Fix handling of 16-bit HBITMAPs in InsertMenu16.
Signed-off-by: Martin Payne <development@martinpayne.me.uk> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b9f32e1672
commit
81fb745e40
|
@ -2405,6 +2405,10 @@ BOOL16 WINAPI InsertMenu16( HMENU16 hMenu, UINT16 pos, UINT16 flags,
|
|||
if ((pos == (UINT16)-1) && (flags & MF_BYPOSITION)) pos32 = (UINT)-1;
|
||||
if (IS_MENU_STRING_ITEM(flags) && data)
|
||||
return InsertMenuA( HMENU_32(hMenu), pos32, flags, id, MapSL(data) );
|
||||
|
||||
/* If "data" is an HBITMAP, the high WORD will contain the application's DGROUP selector if the
|
||||
* application cast (LPSTR)hBitmap rather than (LPSTR)(LONG)hBitmap. */
|
||||
if (flags & MF_BITMAP) data = (SEGPTR)HBITMAP_32(LOWORD(data));
|
||||
return InsertMenuA( HMENU_32(hMenu), pos32, flags, id, (LPSTR)data );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue