I have a list view that I am listing files in a directory along their the corresponding icons. The problem I have is that some of the icons are not getting a transparent background (see attached).
The window is a modal dialog with the ListView control on it.
I am using:
g_hImageLst = ImageList_Create(16,16,ILC_MASK | ILC_COLORDDB, 1, 0);
To setup my ImageList
I am using:
ListView_SetExtendedListViewStyle(hWnd,LVS_EX_SUBITEMIMAGES);
To setup the list view
Then:
SHGetFileInfo(dirInfo.cFileName,FILE_ATTRIBUTE_NORMAL, &shInfo, sizeof(shInfo), SHGFI_USEFILEATTRIBUTES | SHGFI_DISPLAYNAME | SHGFI_TYPENAME | SHGFI_ICON | SHGFI_SMALLICON);
To Get The Files Icon
Finally:
ImageList_AddIcon(g_hImageLst, hIcon );
ListView_SetImageList(m_hWnd, g_hImageLst, LVSIL_SMALL)
To push the icons on the list and set the list.
Any suggestions on how to fix the icons so they look better?
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com