Commit 81fb745e authored by Martin Payne's avatar Martin Payne Committed by Alexandre Julliard

user.exe16: Fix handling of 16-bit HBITMAPs in InsertMenu16.

parent b9f32e16
......@@ -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 );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment