From 4b8d442477e7f762e3f36fffdd9fe447b7858879 Mon Sep 17 00:00:00 2001 From: Markus Goemmel Date: Wed, 6 Jun 2007 12:51:50 +0200 Subject: [PATCH] comctl32/listview.c: Ownerdraw font problem during focus change fixed. --- dlls/comctl32/listview.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index ba94aecab3e..76022174cae 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -1771,6 +1771,9 @@ static void LISTVIEW_ShowFocusRect(const LISTVIEW_INFO *infoPtr, BOOL fShow) DRAWITEMSTRUCT dis; LVITEMW item; + HFONT hFont = infoPtr->hFont ? infoPtr->hFont : infoPtr->hDefaultFont; + HFONT hOldFont = SelectObject(hdc, hFont); + item.iItem = infoPtr->nFocusedItem; item.iSubItem = 0; item.mask = LVIF_PARAM; @@ -1788,6 +1791,8 @@ static void LISTVIEW_ShowFocusRect(const LISTVIEW_INFO *infoPtr, BOOL fShow) dis.itemData = item.lParam; SendMessageW(infoPtr->hwndNotify, WM_DRAWITEM, dis.CtlID, (LPARAM)&dis); + + SelectObject(hdc, hOldFont); } else {