y lhIml
               
            End If
            On Error GoTo 0
         
         Else
            ' extract a copy of the icon:
            hIcon = ImageList_GetIcon(hIml, iImgIndex, 0)
         End If
            
         ' Draw it disabled at x,y:
         If Not (hIcon = 0) And Not (hIcon = -1) Then
            DrawState hdc, 0, 0, hIcon, 0, xPixels, yPixels, lIconSizeX,
             lIconSizeY, DST_ICON Or DSS_DISABLED
            ' Clear up the icon:
            DestroyIcon hIcon
         End