From 36ccda324db0f991e8bd3a59007bdef90f1c844b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Fri, 11 Mar 2016 22:13:48 +0000 Subject: [PATCH] [SHELL32]: Use the system colours for drawing the icon list item selection rectangle, instead of using hardcoded values. svn path=/trunk/; revision=70994 --- reactos/dll/win32/shell32/dialogs/dialogs.cpp | 23 ++++--------------- 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/reactos/dll/win32/shell32/dialogs/dialogs.cpp b/reactos/dll/win32/shell32/dialogs/dialogs.cpp index 35143b31b9c..74abefcc049 100644 --- a/reactos/dll/win32/shell32/dialogs/dialogs.cpp +++ b/reactos/dll/win32/shell32/dialogs/dialogs.cpp @@ -207,25 +207,12 @@ INT_PTR CALLBACK PickIconProc(HWND hwndDlg, hIcon = (HICON)SendMessageW(lpdis->hwndItem, LB_GETITEMDATA, lpdis->itemID, 0); if (lpdis->itemID == (UINT)index) - { - HBRUSH hBrush; - hBrush = CreateSolidBrush(RGB(0, 0, 255)); - FillRect(lpdis->hDC, &lpdis->rcItem, hBrush); - DeleteObject(hBrush); - } + FillRect(lpdis->hDC, &lpdis->rcItem, (HBRUSH)(COLOR_HIGHLIGHT + 1))); else - { - HBRUSH hBrush; - hBrush = CreateSolidBrush(RGB(255, 255, 255)); - FillRect(lpdis->hDC, &lpdis->rcItem, hBrush); - DeleteObject(hBrush); - } - DrawIconEx(lpdis->hDC, lpdis->rcItem.left,lpdis->rcItem.top, hIcon, - 0, - 0, - 0, - NULL, - DI_NORMAL); + FillRect(lpdis->hDC, &lpdis->rcItem, (HBRUSH)(COLOR_WINDOW + 1)); + + DrawIconEx(lpdis->hDC, lpdis->rcItem.left,lpdis->rcItem.top, hIcon, + 0, 0, 0, NULL, DI_NORMAL); break; } break;