From 03217275c7d5072af10cd57f2f8a33a5d95ec508 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sun, 5 Oct 2014 08:55:55 +0000 Subject: [PATCH] [SETUPAPI] Add overlay icons to the class image list. svn path=/trunk/; revision=64535 --- reactos/dll/win32/setupapi/devclass.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/reactos/dll/win32/setupapi/devclass.c b/reactos/dll/win32/setupapi/devclass.c index 446ac915dcd..84b5609419f 100644 --- a/reactos/dll/win32/setupapi/devclass.c +++ b/reactos/dll/win32/setupapi/devclass.c @@ -486,6 +486,7 @@ SetupDiGetClassImageListExW( HICON hIcon; DWORD size; INT i, bpp; + UINT idx; /* Get list of all class GUIDs in given computer */ ret = SetupDiBuildClassInfoListExW( @@ -589,6 +590,19 @@ SetupDiGetClassImageListExW( list->IconIndexes[i] = -1; /* Special value to indicate that the icon is unavailable */ } + /* Finally, add the overlay icons to the image list */ + for (i = 0; i < 2; i++) + { + hIcon = LoadImage(hInstance, MAKEINTRESOURCE(500 + i), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR); + if (hIcon) + { + idx = ImageList_AddIcon(ClassImageListData->ImageList, hIcon); + if (idx != -1) + ImageList_SetOverlayImage(ClassImageListData->ImageList, idx, i); + DestroyIcon(hIcon); + } + } + ret = TRUE; cleanup: -- 2.17.1