#include once "window9.bi"

Function GetGadgetAttribute(ByVal NumberGadget As Integer,ByVal Attribut As Integer) As Integer Export
  Var GID=GetProp(GadgetID(NumberGadget),"addparam60000")
  If GadgetClass(Cast(HWND,GID))=14 Then '"MSCTLS_UPDOWN32"
    If Attribut=0 Then
      return  HiWord(SendMessage(Cast(HWND,GID),WM_USER+102,0,0))
    ElseIf Attribut=1 Then
      return  LoWord(SendMessage(Cast(HWND,GID),WM_USER+102,0,0))
    Else 
      return  SendMessage(Cast(HWND,GID),WM_USER+110,0,0)
    end if
  end if
End Function
