[API]
GetDlgItem
EnableWindow

[CODE]
Public Function LoadResEx_Dialog_SpinnerLong(ByVal DialogHWnd As Long, ByVal ControlID As Long, ByRef Value As Long, Optional ByVal ReadFromDialog As Boolean = False, Optional ByVal Min As Long = -1&, Optional ByVal Max As Long = -1&) As Boolean
  ControlID = GetDlgItem(DialogHWnd, ControlID)
  If Not ControlID = 0& Then
    If ReadFromDialog Then
      ControlID = (SendMessage(ControlID, &H468&, 0&, 0&) And &hffff&)
      If Not (Max = -1& Or Min = -1&) Then
        If ControlID > Max Then
          ControlID = Max
          ElseIf ControlID < Min Then
          ControlID = Min
          End If
        End If
      If Not ControlID = Value Then
        Value = ControlID
        LoadResEx_Dialog_SpinnerLong = True
        End If
      Else
      If Not (Max = -1& Or Min = -1&) Then
        Call SendMessage(ControlID, &H465&, 0&, (Min * &H10000 + Max))
        Call SendMessage(ControlID, &H467&, 0&, Value)
        End If
      End If
    End If
  End Function
