From: James Tabor Date: Wed, 18 Nov 2015 21:25:33 +0000 (+0000) Subject: [Win32SS] X-Git-Tag: ReactOS-0.4.0~128 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=c8e6ca880dca60b0dcb8c1679fff0f99ca0b9407 [Win32SS] - Patch by Huw Davies : Restore the dc's colours after sending WM_DRAWITEM. - Wine sync port. svn path=/trunk/; revision=69932 --- diff --git a/reactos/win32ss/user/ntuser/menu.c b/reactos/win32ss/user/ntuser/menu.c index dd7e4582bad..046dd07012c 100644 --- a/reactos/win32ss/user/ntuser/menu.c +++ b/reactos/win32ss/user/ntuser/menu.c @@ -2266,6 +2266,7 @@ static void FASTCALL MENU_DrawMenuItem(PWND Wnd, PMENU Menu, PWND WndOwner, HDC ** the menu owner has finished drawing. */ DRAWITEMSTRUCT dis; + COLORREF old_bk, old_text; dis.CtlType = ODT_MENU; dis.CtlID = 0; @@ -2289,7 +2290,11 @@ static void FASTCALL MENU_DrawMenuItem(PWND Wnd, PMENU Menu, PWND WndOwner, HDC dis.hDC, dis.rcItem.left, dis.rcItem.top, dis.rcItem.right, dis.rcItem.bottom); TRACE("Ownerdraw: Width %d Height %d\n", dis.rcItem.right-dis.rcItem.left, dis.rcItem.bottom-dis.rcItem.top); + old_bk = GreGetBkColor(hdc); + old_text = GreGetTextColor(hdc); co_IntSendMessage(UserHMGetHandle(WndOwner), WM_DRAWITEM, 0, (LPARAM) &dis); + IntGdiSetBkColor(hdc, old_bk); + IntGdiSetTextColor(hdc, old_text); /* Draw the popup-menu arrow */ if (!menuBar && lpitem->spSubMenu) {