| 56 | } |
| 57 | |
| 58 | void ResourceHelper::AddIconToImageList(HIMAGELIST imageList, IconResourceLoader *iconResourceLoader, Icon icon, |
| 59 | int iconWidth, int iconHeight, IconImageListMapping &imageListMappings) |
| 60 | { |
| 61 | wil::unique_hbitmap bitmap = iconResourceLoader->LoadBitmapFromPNGAndScale(icon, iconWidth, iconHeight); |
| 62 | int imagePosition = ImageList_Add(imageList, bitmap.get(), nullptr); |
| 63 | |
| 64 | if (imagePosition == -1) |
| 65 | { |
| 66 | return; |
| 67 | } |
| 68 | |
| 69 | imageListMappings.insert({ icon, imagePosition }); |
| 70 | } |
nothing calls this directly
no test coverage detected