Author: jimtabor
Date: Thu Jul 7 15:21:54 2016
New Revision: 71846
URL:
http://svn.reactos.org/svn/reactos?rev=71846&view=rev
Log:
[NtUser]
- Patch by Victor Matovykh : Cleanup and optimization. See CORE-11479.
Modified:
trunk/reactos/win32ss/user/ntuser/nonclient.c
Modified: trunk/reactos/win32ss/user/ntuser/nonclient.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/noncli…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/nonclient.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/nonclient.c [iso-8859-1] Thu Jul 7 15:21:54 2016
@@ -943,13 +943,10 @@
if (!(Style & WS_MINIMIZE))
{
- PMENU menu = UserGetMenuObject(UlongToHandle(pWnd->IDMenu));
/* Draw menu bar */
- if ( menu && (((Style) & (WS_CHILD | WS_POPUP)) != WS_CHILD) )
- {
- TempRect = CurrentRect;
- TempRect.bottom = TempRect.top + menu->cyMenu;
- CurrentRect.top += MENU_DrawMenuBar(hDC, &TempRect, pWnd, FALSE);
+ if (HAS_MENU(pWnd, Style))
+ {
+ CurrentRect.top += MENU_DrawMenuBar(hDC, &CurrentRect, pWnd, FALSE);
}
if (ExStyle & WS_EX_CLIENTEDGE)
@@ -1112,13 +1109,13 @@
if (!(Style & WS_MINIMIZE))
{
- PMENU menu = UserGetMenuObject(UlongToHandle(pWnd->IDMenu));
/* Draw menu bar */
- if ( menu && (((Style) & (WS_CHILD | WS_POPUP)) != WS_CHILD) )
+ if (HAS_MENU(pWnd, Style))
{
- TempRect = CurrentRect;
- TempRect.bottom = TempRect.top + menu->cyMenu;
- if (!(Flags & DC_NOSENDMSG)) CurrentRect.top += MENU_DrawMenuBar(hDC,
&TempRect, pWnd, FALSE);
+ if (!(Flags & DC_NOSENDMSG))
+ {
+ CurrentRect.top += MENU_DrawMenuBar(hDC, &CurrentRect, pWnd, FALSE);
+ }
}
if (ExStyle & WS_EX_CLIENTEDGE)
@@ -1219,7 +1216,7 @@
Rect->top += UserGetSystemMetrics(SM_CYCAPTION);
}
- if (Wnd->IDMenu && ((Wnd->style & (WS_CHILD | WS_POPUP)) !=
WS_CHILD))
+ if (HAS_MENU(Wnd, Style))
{
HDC hDC = UserGetDCEx(Wnd, 0, DCX_USESTYLE | DCX_WINDOW);