[INCLUDE]
OSVersionDependent
IsHighColor

[DEFINE]
Public Enum LoadResEx_IconOS
  LoadResEx_IconOS_Win95_16Color '16bit, 95NT+
  LoadResEx_IconOS_Win95 'truecolor, 95NT+
  LoadResEx_IconOS_WinNT
  LoadResEx_IconOS_Win98
  LoadResEx_IconOS_Win2000ME_16Color
  LoadResEx_IconOS_Win2000ME
  LoadResEx_IconOS_WinXP
  LoadResEx_IconOS_WinVista
  End Enum

Private LoadResex_Caps_TrayIcon As Long
Private LoadResex_Caps_WinDIcon As Long

[CODE]
Private Function LoadResEx_IconIDIsUseable(ByVal xCurIndex As Long, ByVal xOrigIndex As Long) As Boolean
  If Not (xCurIndex = LoadResEx_IconOS_WinNT) Or LoadResex_Caps_WinDIcon = LoadResEx_IconOS_WinNT Then
    LoadResEx_IconIDIsUseable = (LoadResEx_IconIDIs16bit(xCurIndex) Or Not LoadResEx_IconIDIs16bit(xOrigIndex))
    End If
  End Function

Private Function LoadResEx_IconIDIs16bit(ByVal xIndex As Long) As Boolean
  Select Case xIndex
    Case LoadResEx_IconOS_Win95_16Color, LoadResEx_IconOS_Win2000ME_16Color ', LoadResEx_IconOS_WinVista_16Color
      LoadResEx_IconIDIs16bit = True
    End Select
  End Function
