From ca3a742dbac304c1dd0339c7c225317bf8249782 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Tue, 18 Apr 2006 17:17:08 +0000 Subject: [PATCH] fix ownerdraw menu for miranda (patch by Brezenbak) svn path=/trunk/; revision=21652 --- reactos/subsystems/win32/win32k/ntuser/menu.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/reactos/subsystems/win32/win32k/ntuser/menu.c b/reactos/subsystems/win32/win32k/ntuser/menu.c index b3122dfdc76..a92ad933e17 100644 --- a/reactos/subsystems/win32/win32k/ntuser/menu.c +++ b/reactos/subsystems/win32/win32k/ntuser/menu.c @@ -744,15 +744,17 @@ BOOL FASTCALL IntSetMenuItemInfo(PMENU_OBJECT MenuObject, PMENU_ITEM MenuItem, PROSMENUITEMINFO lpmii) { PMENU_OBJECT SubMenuObject; + UINT fTypeMask = (MFT_BITMAP | MFT_MENUBARBREAK | MFT_MENUBREAK | MFT_OWNERDRAW | MFT_RADIOCHECK | MFT_RIGHTJUSTIFY | MFT_SEPARATOR | MF_POPUP); if(!MenuItem || !MenuObject || !lpmii) { return FALSE; } - - MenuItem->fType &= ~MENU_ITEM_TYPE(MenuItem->fType); - MenuItem->fType |= MENU_ITEM_TYPE(lpmii->fType); - + if( lpmii->fType & ~fTypeMask) + { + DPRINT("IntSetMenuItemInfo invalid fType flags %x\n", lpmii->fType & ~fTypeMask); + lpmii->fMask &= ~(MIIM_TYPE | MIIM_FTYPE); + } if(lpmii->fMask & MIIM_BITMAP) { MenuItem->hbmpItem = lpmii->hbmpItem;