Hi, I think this code in menu.c,
BOOL WINAPI SetMenuItemInfoA(HMENU hmenu, UINT item, BOOL bypos, const MENUITEMINFOA *lpmii) { if ((lpmii->fType & (MF_HILITE|MF_POPUP)) || (lpmii->fState)) { /* QuickTime does pass invalid data into SetMenuItemInfo. * do some of the checks Windows does. */ WARN("Bad masks for type (0x%08x) or state (0x%08x)\n", lpmii->fType,lpmii->fState ); return FALSE; } ....
is buggy, because it checks the type and state even when fMask doesn't indicate that these fields are being used. It was added by Marcus Meissner at LinuxTag in 2001 which is why I'm confused, the bug I'm playing with/learning how to debug with is a regression and didn't exist a few months ago, yet that code has been in Wine for some time.
Could somebody more experienced than me please look over the description of the MENUITEMINFO struct:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI...
and the SetMenuItemInfo call:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI...
.. and tell me if I'm reading this situation correctly? I don't think it should be returning false like this when fMask is 6, ie MIIM_ID | MIIM_SUBMENU.
It'd only take a minute, promise :)