   Win32 How to see images in listview?
  HiI can't see all the loaded images in the listview. Only the first one isvisible in all the place holders no matter what.If I change the names position on the array the image change, showing only the first image. All images are 32x32   HWND    ListHandle;   LV_ITEM ListItem;   CHAR    bmapfname[][30] = {    "E:/temp/green32.bmp",    "E:/temp/green32.bmp",    "E:/temp/blue32.bmp",    "E:/temp/ball2.bmp",    "E:/temp/red32.bmp",    "E:/temp/blue32.bmp",    "E:/temp/red32.bmp",    "E:/temp/red32.bmp",    "E:/temp/ball2.bmp",    "E:/temp/ball2.bmp"};   HIMAGELIST hIml = ImageList_Create(32,32,false,6,4 ); for( unsigned i = 0; i < 6; i++ )   { HBITMAP hbmImage = (HBITMAP)LoadImage(GetModuleHandle( NULL ),  bmapfname, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE ); ::ImageList_Add(hIml, (HBITMAP)hbmImage,0);   }   ListHandle = GetDlgItem(IDC_LIST1);   ListView_SetImageList(ListHandle, hIml,0 );   for(unsigned char Loop = 0; Loop < Count; Loop++)   { ZeroMemory(&ListItem, sizeof(LV_ITEM)); ListItem.mask = LVIF_TEXT | LVIF_IMAGE; ListItem.iItem = Loop; ListItem.pszText = "qwerty"; // for test only ListItem.cchTextMax = 128; SendMessage(ListHandle, LVM_INSERTITEM, 0, (LPARAM)&ListItem);ListItem.iSubItem = 1;SendMessage(ListHandle, LVM_SETITEM, 0, (LPARAM)&ListItem );   }What I'm doing wrong?....Thanks
  You never set the value of iImage in your LVITEM structure. As the documentation indicates, iImage should be set to the index of the image you want to display from the imagelist. Since you ZeroMemory the structure before passing it to the listview control, it always sees index 0 for the image, which explains what you're seeing.   ;  You are right!! Thanks :)   