+ case MCN_SELCHANGE:
+ {
+ // we need to update m_date first, before calling the user code
+ // which expects GetDate() to return the new date
+ const wxDateTime dateOld = m_date;
+ const NMSELCHANGE * const sch = (NMSELCHANGE *)lParam;
+ wxMSWDateControls::FromSystemTime(&m_date, sch->stSelStart);
+
+ // changing the year or the month results in a second dummy
+ // MCN_SELCHANGE event on this system which doesn't really
+ // change anything -- filter it out
+ if ( m_date != dateOld )
+ {
+ GenerateAllChangeEvents(dateOld);
+ }
+ }
+ break;
+
+ case MCN_GETDAYSTATE:
+ {
+ const NMDAYSTATE * const ds = (NMDAYSTATE *)lParam;
+ for ( int i = 0; i < ds->cDayState; i++ )
+ {
+ ds->prgDayState[i] = m_marks;
+ }
+ }
+ break;
+
+ default:
+ return wxCalendarCtrlBase::MSWOnNotify(idCtrl, lParam, result);
+ }
+
+ *result = 0;
+ return true;
+}
+
+void wxCalendarCtrl::MSWOnDoubleClick(wxMouseEvent& event)
+{
+ if ( HitTest(event.GetPosition()) == wxCAL_HITTEST_DAY )
+ {
+ if ( GenerateEvent(wxEVT_CALENDAR_DOUBLECLICKED) )
+ return; // skip event.Skip() below