Get system image list not working in some cases
-
I am trying to get an image list handle from system icons, like that:
return (HIMAGELIST)SHGetFileInfo(_T("c:\\"), 0, &sfi, sizeof(SHFILEINFO), SHGFI_SYSICONINDEX | SHGFI_SMALLICON);
and is working good, except on some PCs, where there is some icons without any icon. I am using this handle to a CListCtrl: Where icon has found: Capture — Postimage.org[^] Where icon hasn't: Capture2 — Postimage.org[^] Of course that OS has the icon and program for every type of files, including case where my code dont't work ... Last edit: Here is what is looking the list control with this state of icons: Capture — Postimage.org[^] So one of files has icons, one hasn't ... and I am not figure out why ...
-
I am trying to get an image list handle from system icons, like that:
return (HIMAGELIST)SHGetFileInfo(_T("c:\\"), 0, &sfi, sizeof(SHFILEINFO), SHGFI_SYSICONINDEX | SHGFI_SMALLICON);
and is working good, except on some PCs, where there is some icons without any icon. I am using this handle to a CListCtrl: Where icon has found: Capture — Postimage.org[^] Where icon hasn't: Capture2 — Postimage.org[^] Of course that OS has the icon and program for every type of files, including case where my code dont't work ... Last edit: Here is what is looking the list control with this state of icons: Capture — Postimage.org[^] So one of files has icons, one hasn't ... and I am not figure out why ...
-
Try adding some debug code to see exactly what is being returned on your call to
SHGetFileInfo
.