Author: jimtabor
Date: Wed Nov 18 21:25:33 2015
New Revision: 69932
URL:
http://svn.reactos.org/svn/reactos?rev=69932&view=rev
Log:
[Win32SS]
- Patch by Huw Davies : Restore the dc's colours after sending WM_DRAWITEM.
- Wine sync port.
Modified:
trunk/reactos/win32ss/user/ntuser/menu.c
Modified: trunk/reactos/win32ss/user/ntuser/menu.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/menu.c…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/menu.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/menu.c [iso-8859-1] Wed Nov 18 21:25:33 2015
@@ -2266,6 +2266,7 @@
** the menu owner has finished drawing.
*/
DRAWITEMSTRUCT dis;
+ COLORREF old_bk, old_text;
dis.CtlType = ODT_MENU;
dis.CtlID = 0;
@@ -2289,7 +2290,11 @@
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)
{