If bMapSysColors Then
          un2 = un2 Or LR_LOADMAP3DCOLORS
      End If
      ' Choose the icon closest to the image list size:
      If iType &lt;&gt; IMAGE_BITMAP Then
         iX = m_lIconSizeX
         iY = m_lIconSizeY
      End If
      hImage = LoadImageLong(hInst, lID, iType, 0, 0, un2)
      AddFromResourceID = AddFromHandle(hImage, iType, vKey, lBackColor,
       vKeyAfter)
      Select Case iType
      Case IMAGE_ICON
         DestroyIcon hImage
      Case IMAGE_CURSOR
         DestroyCursor