From 8976fa2e030d7331d29258b1ef39bdd9444785bc Mon Sep 17 00:00:00 2001 From: Ged Murphy Date: Tue, 4 Sep 2007 21:30:22 +0000 Subject: [PATCH] - fix SetupDiLoadClassIcon to load 32x22 for the large icon - fix SetupDiGetClassImageList to load 16x16 icons for the device image list. - devmgmt now loads up the correct sizes for both the treeview and the property page svn path=/trunk/; revision=28860 --- reactos/dll/win32/setupapi/devclass.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/reactos/dll/win32/setupapi/devclass.c b/reactos/dll/win32/setupapi/devclass.c index 6cb2ed6720d..b3d8266ae34 100644 --- a/reactos/dll/win32/setupapi/devclass.c +++ b/reactos/dll/win32/setupapi/devclass.c @@ -1459,17 +1459,25 @@ SetupDiGetClassImageListExW( * and put their index in the image list in the IconIndexes array */ for (i = 0; i < list->NumberOfGuids; i++) { + INT miniIconIndex; + ret = SetupDiLoadClassIcon( &list->Guids[i], - &hIcon, - NULL); + NULL, + &miniIconIndex); if (ret) { - list->IconIndexes[i] = ImageList_AddIcon(ClassImageListData->ImageList, hIcon); - DestroyIcon(hIcon); + hIcon = LoadImage(hInstance, MAKEINTRESOURCE(miniIconIndex), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR); + if (hIcon) + { + list->IconIndexes[i] = ImageList_AddIcon(ClassImageListData->ImageList, hIcon); + DestroyIcon(hIcon); + } + else + list->IconIndexes[i] = -1; } else - list->IconIndexes[i] = -1; /* Special value to tell that icon is unavailable */ + list->IconIndexes[i] = -1; /* Special value to indicate that the icon is unavailable */ } ret = TRUE; @@ -1615,7 +1623,7 @@ SetupDiLoadClassIcon( TRACE("Icon index %d, dll name %s\n", iconIndex, debugstr_w(DllName)); if (LargeIcon) { - *LargeIcon = LoadImage(hInstance, MAKEINTRESOURCE(iconIndex), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR); + *LargeIcon = LoadImage(hInstance, MAKEINTRESOURCE(iconIndex), IMAGE_ICON, 32, 32, LR_DEFAULTCOLOR); if (!*LargeIcon) { SetLastError(ERROR_INVALID_INDEX);