Has anyone been able to use the ImageList_SetOverlayImage API in VB? In the
code below I'm trying to set the SHORTCUTARROW32 icon as the overlay image 1
in the imagelist. However, the API will always return zero.

Public Declare Function ImageList_SetOverlayImage Lib "Comctl32.dll" (himl
As Long, ByVal iImage As Long, ByVal iOverlay As Long) As Long

With ImageList
.ImageHeight = 32
.ImageWidth = 32
With .ListImages
.Add , "ICON1", Image1.Picture
.Add , "SHORTCUTARROW32", imgArrow32.Picture
End With
lR = ImageList_SetOverlayImage(.hImageList, 1, 1)
If lR = 0 Then
Debug.Assert False
End If
End With
End Sub