rem: flags |= MF_POPUP;
add: if (mePtr->state != ENTRY_DISABLED) { flags |= MF_POPUP; }
context: ReconfigureWindowsMenu(    ClientData clientData)	    /* The menu we are rebuilding */{    TkMenu *menuPtr = (TkMenu *) clientData;    TkMenuEntry *mePtr;    HMENU winMenuHdl = (HMENU) menuPtr->platformData;    TCHAR *itemText = NULL;    const TCHAR *lpNewItem;    UINT flags;    UINT itemID;    int i, count, systemMenu = 0, base;    int width, height;    Tcl_DString translatedText;      if (NULL == winMenuHdl) {    	return;    }    /*     * Reconstruct the entire menu. Takes care of nasty system menu and index     * problem.     *     */    if ((menuPtr->menuType == MENUBAR)	    && (menuPtr->parentTopLevelPtr != NULL)) {	width = Tk_Width(menuPtr->parentTopLevelPtr);	height = Tk_Height(menuPtr->parentTopLevelPtr);    }    base = (menuPtr->menuFlags & MENU_SYSTEM_MENU) ? 7 : 0;    count = GetMenuItemCount(winMenuHdl);    for (i = base; i < count; i++) {	RemoveMenu(winMenuHdl, base, MF_BYPOSITION);    }    count = menuPtr->numEntries;    for (i = 0; i < count; i++) {	mePtr = menuPtr->entries[i];	lpNewItem = NULL;	flags = MF_BYPOSITION;	itemID = 0;	Tcl_DStringInit(&translatedText);	if ((menuPtr->menuType == MENUBAR) && (mePtr->type == TEAROFF_ENTRY)) {	    continue;	}	itemText = GetEntryText(mePtr);	if ((menuPtr->menuType == MENUBAR)		|| (menuPtr->menuFlags & MENU_SYSTEM_MENU)) {	    Tcl_UtfToExternalDString(NULL, itemText, -1, &translatedText);	    lpNewItem = Tcl_DStringValue(&translatedText);	} else {	    lpNewItem = (LPCTSTR) mePtr;	    flags |= MF_OWNERDRAW;	}	/*	 * Set enabling and disabling correctly.	 */		if (mePtr->state == ENTRY_DISABLED) {	    flags |= MF_DISABLED | MF_GRAYED;	}		/*	 * Set the check mark for check entries and radio entries.	 */		if (((mePtr->type == CHECK_BUTTON_ENTRY)		|| (mePtr->type == RADIO_BUTTON_ENTRY))		&& (mePtr->entryFlags & ENTRY_SELECTED)) {	    flags |= MF_CHECKED;	}		/*	 * Set the SEPARATOR bit for separator entries.  This bit is not	 * used by our internal drawing functions, but it is used by the	 * system when drawing the system menu (we do not draw the system menu	 * ourselves).  If this bit is not set, separator entries on the system	 * menu will not be drawn correctly.	 */	if (mePtr->type == SEPARATOR_ENTRY) {	    flags |= MF_SEPARATOR;	}		if (mePtr->columnBreak) {	    flags |= MF_MENUBREAK;	}		itemID = (int) mePtr->platformEntryData;	if ((mePtr->type == CASCADE_ENTRY)		&& (mePtr->childMenuRefPtr != NULL)		&& (mePtr->childMenuRefPtr->menuPtr != NULL)) {	    HMENU childMenuHdl = (HMENU) mePtr->childMenuRefPtr->menuPtr		->platformData;	    if (childMenuHdl != NULL) {		itemID = (UINT) childMenuHdl;		flags |= MF_POPUP;	    }	    if ((menuPtr->menuType == MENUBAR) 		    && !(mePtr->childMenuRefPtr->menuPtr->menuFlags			    & MENU_SYSTEM_MENU)) {		Tcl_DString ds;		TkMenuReferences *menuRefPtr;		TkMenu *systemMenuPtr = mePtr->childMenuRefPtr->menuPtr;				Tcl_DStringInit(&ds);		Tcl_DStringAppend(&ds,			Tk_PathName(menuPtr->masterMenuPtr->tkwin), -1);		Tcl_DStringAppend(&ds, ".system", 7);				menuRefPtr = TkFindMenuReferences(menuPtr->interp,			Tcl_DStringValue(&ds));				Tcl_DStringFree(&ds);				if ((menuRefPtr != NULL) 			&& (menuRefPtr->menuPtr != NULL)			&& (menuPtr->parentTopLevelPtr != NULL)			&& (systemMenuPtr->masterMenuPtr				== menuRefPtr->menuPtr)) {		    HMENU systemMenuHdl = 			(HMENU) systemMenuPtr->platformData;		    HWND wrapper = TkWinGetWrapperWindow(menuPtr			    ->parentTopLevelPtr);		    if (wrapper != NULL) {			DestroyMenu(systemMenuHdl);			systemMenuHdl = GetSystemMenu(wrapper, FALSE);			systemMenuPtr->menuFlags |= MENU_SYSTEM_MENU;			systemMenuPtr->platformData = 			    (TkMenuPlatformData) systemMenuHdl;			if (!(systemMenuPtr->menuFlags 				& MENU_RECONFIGURE_PENDING)) {			    systemMenuPtr->menuFlags 				|= MENU_RECONFIGURE_PENDING;			    Tcl_DoWhenIdle(ReconfigureWindowsMenu,				    (ClientData) systemMenuPtr);			}		    }		}	    }	    if (mePtr->childMenuRefPtr->menuPtr->menuFlags		    & MENU_SYSTEM_MENU) {		systemMenu++;	    }	}	if (!systemMenu) {	    InsertMenu(winMenuHdl, 0xFFFFFFFF, flags, itemID, lpNewItem);	}	Tcl_DStringFree(&translatedText);	if (itemText != NULL) {	    ckfree(itemText);	    itemText = NULL;	}    }    if ((menuPtr->menuType == MENUBAR) 	    && (menuPtr->parentTopLevelPtr != NULL)) {	DrawMenuBar(TkWinGetWrapperWindow(menuPtr->parentTopLevelPtr));	Tk_GeometryRequest(menuPtr->parentTopLevelPtr, width, height);    }        menuPtr->menuFlags &= ~(MENU_RECONFIGURE_PENDING);}