if (!(Flags & DC_NOVISIBLE) && !IntIsWindowVisible(pWnd)) return;
- ERR("UserDrawCaptionBar: pWnd %p, hDc %p, Flags 0x%x.\n", pWnd, hDC, Flags);
+ TRACE("UserDrawCaptionBar: pWnd %p, hDc %p, Flags 0x%x.\n", pWnd, hDC, Flags);
Style = pWnd->style;
ExStyle = pWnd->ExStyle;
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;
- CurrentRect.top += MENU_DrawMenuBar(hDC, &TempRect, pWnd, FALSE);
+ CurrentRect.top += MENU_DrawMenuBar(hDC, &CurrentRect, pWnd, FALSE);
}
if (ExStyle & WS_EX_CLIENTEDGE)
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)
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);