Author: cwittich
Date: Tue Apr 18 21:17:08 2006
New Revision: 21652
URL:
http://svn.reactos.ru/svn/reactos?rev=21652&view=rev
Log:
fix ownerdraw menu for miranda (patch by Brezenbak)
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/menu.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/menu.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/menu.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/menu.c Tue Apr 18 21:17:08 2006
@@ -744,15 +744,17 @@
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;