WND* child = WIN_FindWndPtr(hChild);
#endif
HMENU hSysPopup = 0;
- HBITMAP hSysMenuBitmap = 0;
+ HBITMAP hSysMenuBitmap = 0;
TRACE("frame %p,child %p\n",frame,hChild);
SC_RESTORE, (LPSTR)(DWORD)HBMMENU_MBAR_RESTORE );
/* In Win 95 look, the system menu is replaced by the child icon */
-
-/* FIXME */
#ifndef __REACTOS__
if(TWEAK_WineLook > WIN31_LOOK)
+#endif
{
HICON hIcon = (HICON)GetClassLongA(hChild, GCL_HICONSM);
if (!hIcon)
}
}
}
+#ifndef __REACTOS__
else
hSysMenuBitmap = hBmpClose;
#endif
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: menu.c,v 1.65 2004/05/03 22:16:09 gvg Exp $
+/* $Id: menu.c,v 1.66 2004/05/13 20:21:27 navaraf Exp $
*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/menu.c
case (INT_PTR) HBMMENU_MBAR_MINIMIZE_D:
case (INT_PTR) HBMMENU_MBAR_CLOSE:
case (INT_PTR) HBMMENU_MBAR_CLOSE_D:
- Size->cx = GetSystemMetrics(SM_CXSIZE);
- Size->cy = GetSystemMetrics(SM_CYSIZE);
+ /* FIXME: Why we need to subtract these magic values? */
+ Size->cx = GetSystemMetrics(SM_CXSIZE) - 2;
+ Size->cy = GetSystemMetrics(SM_CYSIZE) - 4;
return;
case (INT_PTR) HBMMENU_CALLBACK:
case (INT_PTR) HBMMENU_POPUP_CLOSE:
UINT Flags = 0;
RECT r;
+ r = *Rect;
switch ((int) Item->hbmpItem)
{
case (INT_PTR) HBMMENU_SYSTEM:
Flags = DFCS_CAPTIONRESTORE;
break;
case (INT_PTR) HBMMENU_MBAR_MINIMIZE:
+ r.right += 1;
Flags = DFCS_CAPTIONMIN;
break;
case (INT_PTR) HBMMENU_MBAR_MINIMIZE_D:
+ r.right += 1;
Flags = DFCS_CAPTIONMIN | DFCS_INACTIVE;
break;
case (INT_PTR) HBMMENU_MBAR_CLOSE:
FIXME("Magic menu bitmap not implemented\n");
return;
}
- r = *Rect;
InflateRect(&r, -1, -1);
if (0 != (Item->fState & MF_HILITE))
{
/* Leave space for the sunken border */
ItemInfo->Rect.right += 2;
ItemInfo->Rect.bottom += 2;
+
+ /* Special case: Minimize button doesn't have a space behind it. */
+ if (ItemInfo->hbmpItem == (HBITMAP)HBMMENU_MBAR_MINIMIZE ||
+ ItemInfo->hbmpItem == (HBITMAP)HBMMENU_MBAR_MINIMIZE_D)
+ ItemInfo->Rect.right -= 1;
}
/* it must be a text item - unless it's the system menu */
}
}
+/* FIXME: Is this really needed? */
+#if 0
/* Finish the line (set all items to the largest height found) */
while (Start < i)
{
}
Start++;
}
+#else
+ Start = i;
+#endif
}
Rect->bottom = MaxY;
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: menu.c,v 1.54 2004/05/10 17:07:18 weiden Exp $
+/* $Id: menu.c,v 1.55 2004/05/13 20:21:27 navaraf Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
return FALSE;
}
+ /* Force size recalculation! */
+ MenuObject->MenuInfo.Height = 0;
+
pos = IntInsertMenuItemToList(MenuObject, MenuItem, pos);
return pos >= 0;