#include once "window9.bi"

Type SYSTEMDATEANDTIME_
  As Short Year_
  As Short Month_
  As Short Weekday_
  As Short Day_
  As Short Hour_
  As Short minute_
  As Short second_
  As Short msec_
End Type
Dim shared sTime As SYSTEMDATEANDTIME_

Function SetStateCalendar Alias "SetStateCalendar"(ByVal gadget As integer,ByVal YEAR_ As Integer,ByVal MONTH_ As Integer,ByVal DAY_ As Integer) As Integer export
  sTime.Year_=YEAR_
  sTime.Month_=MONTH_
  sTime.Day_=DAY_
  Return SendMessage(GadgetID(gadget), 4098,0 ,Cast(LPARAM,@sTime))
End Function
