I am creating a Listview and I want to assign an Image list to my ListView so I can use images in my Items. Next is a peace of my code:
Problem is that 'lngtest' returns a 0-handle (value 0). So when I am adding Items with Images, the Images won't appear, because of this bug.Code:lngImageList = ImageList_Create(32, 32, ILC_MASK, 1, 1) ImageList_Add lngImageList, LoadResPicture(102, 1).Handle, 0 lngStyle = WS_CHILD Or WS_VISIBLE Or LVS_REPORT m_hWndLV = CreateWindowEx(WS_EX_CLIENTEDGE, "SysListView32", vbNullString, _ lngStyle, 10, 10, 300, 200, Me.hwnd, 0, App.hInstance, ByVal 0&) lngtest = SendMessage(m_hWndLV, LVM_SETIMAGELIST, LVSIL_SMALL, lngImageList)
Does someone has any idea what I did wrong in assigning the imagelist to my listview?
Tnx.




Reply With Quote