So I'm using an ImageCombo to display a list of directories, so need to have it associated with the system imagelist. Seems simple enough, but I was testing for XP compatibility and noticed that while it works perfectly on Win7, on XP no icons are visible, and there's not even an indent. VB imagelist works normally, so it's a little odd. Is this a known issue? I couldn't find any information about it.
There's no errors, and the first item is added with just the text, no icon. Same for all subsequent adds.
Code:
Private Sub InitCBPath()
Dim hImgL As Long
hImgL = GetSystemImagelist(SHGFI_SMALLICON)
Call SendMessage(cbPath.hWnd, CBEM_SETIMAGELIST, 0, ByVal hImgL)
Call SendMessage(cbPath.hWnd, CB_SETDROPPEDWIDTH, 300&, ByVal 0&)
Call SubClass(cbPath.hWnd, AddressOf CBXWndProc)
'Add the default 'all fixed drives' item
Dim cbi As ComboItem, cbxi As COMBOBOXEXITEM
Set cbi = cbPath.ComboItems.Add(, , cFind.Path)
cbxi.iItem = cbi.Index - 1
cbxi.iImage = GetFileIconIndex(Left(cFind.Path, 3), SHGFI_SMALLICON) 'usually C:\
cbxi.mask = CBEIF_IMAGE
Call SendMessage(cbPath.hWnd, CBEM_SETITEM, 0, cbxi)
End Sub