Author: ekohl Date: Sun Oct 5 08:55:55 2014 New Revision: 64535
URL: http://svn.reactos.org/svn/reactos?rev=64535&view=rev Log: [SETUPAPI] Add overlay icons to the class image list.
Modified: trunk/reactos/dll/win32/setupapi/devclass.c
Modified: trunk/reactos/dll/win32/setupapi/devclass.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/devclass... ============================================================================== --- trunk/reactos/dll/win32/setupapi/devclass.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/setupapi/devclass.c [iso-8859-1] Sun Oct 5 08:55:55 2014 @@ -486,6 +486,7 @@ HICON hIcon; DWORD size; INT i, bpp; + UINT idx;
/* Get list of all class GUIDs in given computer */ ret = SetupDiBuildClassInfoListExW( @@ -587,6 +588,19 @@ } else 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;