[SETUPAPI]

Add overlay icons to the class image list.

svn path=/trunk/; revision=64535
This commit is contained in:
Eric Kohl 2014-10-05 08:55:55 +00:00
parent 43986a8db8
commit 03217275c7

View file

@ -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: