mirror of
https://github.com/reactos/reactos.git
synced 2025-01-04 05:20:54 +00:00
[NtUser]
- Patch by Victor Matovykh : Cleanup and optimization. See CORE-11479. svn path=/trunk/; revision=71846
This commit is contained in:
parent
4cf4d58a41
commit
eaef5b9f37
1 changed files with 8 additions and 11 deletions
|
@ -943,13 +943,10 @@ VOID UserDrawCaptionBar(
|
||||||
|
|
||||||
if (!(Style & WS_MINIMIZE))
|
if (!(Style & WS_MINIMIZE))
|
||||||
{
|
{
|
||||||
PMENU menu = UserGetMenuObject(UlongToHandle(pWnd->IDMenu));
|
|
||||||
/* Draw menu bar */
|
/* Draw menu bar */
|
||||||
if ( menu && (((Style) & (WS_CHILD | WS_POPUP)) != WS_CHILD) )
|
if (HAS_MENU(pWnd, Style))
|
||||||
{
|
{
|
||||||
TempRect = CurrentRect;
|
CurrentRect.top += MENU_DrawMenuBar(hDC, &CurrentRect, pWnd, FALSE);
|
||||||
TempRect.bottom = TempRect.top + menu->cyMenu;
|
|
||||||
CurrentRect.top += MENU_DrawMenuBar(hDC, &TempRect, pWnd, FALSE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ExStyle & WS_EX_CLIENTEDGE)
|
if (ExStyle & WS_EX_CLIENTEDGE)
|
||||||
|
@ -1112,13 +1109,13 @@ NC_DoNCPaint(PWND pWnd, HDC hDC, INT Flags)
|
||||||
|
|
||||||
if (!(Style & WS_MINIMIZE))
|
if (!(Style & WS_MINIMIZE))
|
||||||
{
|
{
|
||||||
PMENU menu = UserGetMenuObject(UlongToHandle(pWnd->IDMenu));
|
|
||||||
/* Draw menu bar */
|
/* Draw menu bar */
|
||||||
if ( menu && (((Style) & (WS_CHILD | WS_POPUP)) != WS_CHILD) )
|
if (HAS_MENU(pWnd, Style))
|
||||||
{
|
{
|
||||||
TempRect = CurrentRect;
|
if (!(Flags & DC_NOSENDMSG))
|
||||||
TempRect.bottom = TempRect.top + menu->cyMenu;
|
{
|
||||||
if (!(Flags & DC_NOSENDMSG)) CurrentRect.top += MENU_DrawMenuBar(hDC, &TempRect, pWnd, FALSE);
|
CurrentRect.top += MENU_DrawMenuBar(hDC, &CurrentRect, pWnd, FALSE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ExStyle & WS_EX_CLIENTEDGE)
|
if (ExStyle & WS_EX_CLIENTEDGE)
|
||||||
|
@ -1219,7 +1216,7 @@ LRESULT NC_HandleNCCalcSize( PWND Wnd, WPARAM wparam, RECTL *Rect, BOOL Suspende
|
||||||
Rect->top += UserGetSystemMetrics(SM_CYCAPTION);
|
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);
|
HDC hDC = UserGetDCEx(Wnd, 0, DCX_USESTYLE | DCX_WINDOW);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue