Ничего не осталось, кроме этого (видно пробовал тестировать):
global CalendarControl
gui +hwndmehwnd
activexStart := "Codejock.", activexEnd := ".16.3.1"
Gui, Add, ActiveX, x0 y0 w800 h70 vCalendarCaptionBar, % activexStart "CalendarCaptionBar" activexEnd
Gui, Add, ActiveX, x0 y70 w800 h300 vCalendarControl, % activexStart "CalendarControl" activexEnd
Gui, Add, ActiveX, x0 y300 w800 h300 vDatePicker, % activexStart "DatePicker" activexEnd
CalendarCaptionBar.AttachToCalendar(CalendarControl)
DatePicker.AttachToCalendar(CalendarControl)
ComObjConnect(CalendarCaptionBar, "CalendarCaptionBar_")
ComObjConnect(CalendarControl, "CalendarControl_")
global CalendarDialogs := ComobjCreate(activexStart "CalendarDialogs" activexEnd)
mehwnd+=0
CalendarDialogs.ParentHWND() := mehwnd
global CalendarHitTestInfo :=CalendarControl.ActiveView.HitTest
CalendarDialogs.Calendar := CalendarControl
CalendarControl.SetDataProvider("Provider=XML;Data Source=" A_ScriptDir "\Events.xml")
if !CalendarControl.DataProvider.Open
CalendarControl.DataProvider.Create
CalendarControl.Populate()
Gui, Show, w800 h600
CalendarControl_DblClick()
{
if !CalendarControl.ActiveView.HitTest.ViewEvent.Event.ID
{
; CalendarDialogs.ShowNewEvent
; CalendarControl.DataProvider.Save
CalendarEvent := CalendarControl.DataProvider.CreateEvent
CalendarEvent.Subject := "MyInitialSubject"
CalendarEvent.StartTime := "10/27/2021 02:30 PM"
CalendarEvent.EndTime := "10/27/2021 03:30 PM"
CalendarControl.DataProvider.AddEvent(CalendarEvent)
CalendarControl.DataProvider.Save
CalendarControl.Populate()
}
}
CalendarCaptionBar_BeforeItemClick(a, b)
{
; msgbox % ComObjValue(b)
; NumPut(-1, ComObjValue(b), "short")
return
}
Код абсолютно не помню - как я понимаю более 2 лет прошло.