Author: gadamopoulos Date: Sat Apr 1 10:18:40 2017 New Revision: 74260
URL: http://svn.reactos.org/svn/reactos?rev=74260&view=rev Log: [WIN32K] -Correct one parameter in NtUserPaintMenuBar and make it return the height of the menu bar. [UXTHEME] -Pass the correct parameter to PaintMenuBar. Draw the edge of WS_EX_CLIENTEDGE even if the window has a themed frame.
Modified: trunk/reactos/dll/win32/uxtheme/nonclient.c trunk/reactos/win32ss/user/ntuser/menu.c
Modified: trunk/reactos/dll/win32/uxtheme/nonclient.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/nonclient... ============================================================================== --- trunk/reactos/dll/win32/uxtheme/nonclient.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/uxtheme/nonclient.c [iso-8859-1] Sat Apr 1 10:18:40 2017 @@ -474,11 +474,17 @@
InflateRect(prcCurrent, -Width, -Height); } - - if (context->wi.dwExStyle & WS_EX_CLIENTEDGE) - { - DrawEdge(context->hDC, prcCurrent, EDGE_SUNKEN, BF_RECT | BF_ADJUST); - } +} + +static void ThemeDrawMenuBar(PDRAW_CONTEXT pcontext, RECT* prcCurrent) +{ + /* Let the window manager paint the menu */ + prcCurrent->top += PaintMenuBar(pcontext->hWnd, + pcontext->hDC, + pcontext->wi.cxWindowBorders, + pcontext->wi.cxWindowBorders, + prcCurrent->top, + pcontext->Active); }
static void @@ -505,7 +511,10 @@ return;
if(HAS_MENU(pcontext->hWnd, pcontext->wi.dwStyle)) - PaintMenuBar(pcontext->hWnd, pcontext->hDC, prcCurrent->left, prcCurrent->right, prcCurrent->top, pcontext->Active); + ThemeDrawMenuBar(pcontext, prcCurrent); + + if (pcontext->wi.dwExStyle & WS_EX_CLIENTEDGE) + DrawEdge(pcontext->hDC, prcCurrent, EDGE_SUNKEN, BF_RECT | BF_ADJUST);
if(pcontext->wi.dwStyle & WS_HSCROLL) ThemeDrawScrollBar(pcontext, SB_HORZ , NULL);
Modified: trunk/reactos/win32ss/user/ntuser/menu.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/menu.c?... ============================================================================== --- trunk/reactos/win32ss/user/ntuser/menu.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/menu.c [iso-8859-1] Sat Apr 1 10:18:40 2017 @@ -6050,13 +6050,14 @@ NtUserPaintMenuBar( HWND hWnd, HDC hDC, - ULONG left, - ULONG right, + ULONG leftBorder, + ULONG rightBorder, ULONG top, BOOL bActive) { PWND Window; RECT Rect; + DWORD ret;
UserEnterExclusive();
@@ -6067,17 +6068,16 @@ return 0; }
- Rect.left = left; - Rect.right = right; + Rect.left = leftBorder; + Rect.right = Window->rcWindow.right - Window->rcWindow.left - rightBorder; Rect.top = top; Rect.bottom = 0;
- MENU_DrawMenuBar(hDC, &Rect, Window, FALSE); + ret = MENU_DrawMenuBar(hDC, &Rect, Window, FALSE);
UserLeave();
- /* I am not sure about what this function returns */ - return 0; + return ret; }
/*