mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-27 03:43:36 +00:00
[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. svn path=/trunk/; revision=74260
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user