#Include once "window9.bi"

Function CalendarGadget Alias "CalendarGadget"(ByVal gadget As integer,ByVal x As Integer,ByVal y As Integer,ByVal width_ As Integer,ByVal height_ As Integer,ByVal Style As Integer=0) As HWND Export
  Var hhh =CreateWindowEx( Style, "SysMonthCal32", "", WS_CHILD Or WS_VISIBLE, x, y, width_ , height_, Cast(HWND,GETGURRENTAL()), Cast(HMENU,gadget),0,0)
  ADDIN9999 (gadget,hhh)
  If GGF()<>0 Then
    SendMessage(Cast(HWND,hhh),WM_SETFONT,GGF(),0)
  EndIf
  Return hhh
End Function
