diff --git a/reactos/dll/win32/uxtheme/nonclient.c b/reactos/dll/win32/uxtheme/nonclient.c index 962c5cbdda1..b2c107dc331 100644 --- a/reactos/dll/win32/uxtheme/nonclient.c +++ b/reactos/dll/win32/uxtheme/nonclient.c @@ -474,11 +474,17 @@ DrawClassicFrame(PDRAW_CONTEXT context, RECT* prcCurrent) 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 @@ ThemePaintWindow(PDRAW_CONTEXT pcontext, RECT* prcCurrent, BOOL bDoDoubleBufferi 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); diff --git a/reactos/win32ss/user/ntuser/menu.c b/reactos/win32ss/user/ntuser/menu.c index 2d3ee0ef386..6db88ebc618 100644 --- a/reactos/win32ss/user/ntuser/menu.c +++ b/reactos/win32ss/user/ntuser/menu.c @@ -6050,13 +6050,14 @@ APIENTRY 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 @@ NtUserPaintMenuBar( 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; } /*