Commit e7968487 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

user32: Restore the dc's colours after sending WM_DRAWITEM.

parent fcf9ec80
...@@ -1458,6 +1458,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc, ...@@ -1458,6 +1458,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
** the menu owner has finished drawing. ** the menu owner has finished drawing.
*/ */
DRAWITEMSTRUCT dis; DRAWITEMSTRUCT dis;
COLORREF old_bk, old_text;
dis.CtlType = ODT_MENU; dis.CtlType = ODT_MENU;
dis.CtlID = 0; dis.CtlID = 0;
...@@ -1475,8 +1476,12 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc, ...@@ -1475,8 +1476,12 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
"hwndItem=%p, hdc=%p, rcItem=%s\n", hwndOwner, "hwndItem=%p, hdc=%p, rcItem=%s\n", hwndOwner,
dis.itemID, dis.itemState, dis.itemAction, dis.hwndItem, dis.itemID, dis.itemState, dis.itemAction, dis.hwndItem,
dis.hDC, wine_dbgstr_rect( &dis.rcItem)); dis.hDC, wine_dbgstr_rect( &dis.rcItem));
old_bk = GetBkColor( hdc );
old_text = GetTextColor( hdc );
SendMessageW( hwndOwner, WM_DRAWITEM, 0, (LPARAM)&dis ); SendMessageW( hwndOwner, WM_DRAWITEM, 0, (LPARAM)&dis );
/* Draw the popup-menu arrow */ /* Draw the popup-menu arrow */
SetBkColor( hdc, old_bk );
SetTextColor( hdc, old_text );
if (lpitem->fType & MF_POPUP) if (lpitem->fType & MF_POPUP)
draw_popup_arrow( hdc, rect, arrow_bitmap_width, draw_popup_arrow( hdc, rect, arrow_bitmap_width,
arrow_bitmap_height); arrow_bitmap_height);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment