#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 win9GetGadgetClass(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
