#Include once "window9.bi"

Function SetGadgetAttribute(ByVal NumberGadget As integer,ByVal Attribut As Integer,ByVal ValueMax As Integer,ByVal ValueMin As Integer) As Integer Export
  Var GID=GetProp(GadgetID(NumberGadget),"addparam60000")
  If GadgetClass(GID)=14 Then '"MSCTLS_UPDOWN32"
    If Attribut=0 Or Attribut=1  Then
      Return SendMessage(GID,WM_USER+101,0,MAKELONG(ValueMax,ValueMin))
    Else 
      Return SendMessage(GID,WM_USER+109,ValueMax,0)
    end if
  end if
End Function
