Calendar not displaying End Points for events |
Post Reply |
Author | |
madalfred
Newbie Joined: 30 June 2010 Location: Australia Status: Offline Points: 1 |
Post Options
Thanks(0)
Posted: 30 June 2010 at 1:44am |
I am working in a project that requires a read-only calendar on a dialog. I have stripped back the calendar controls(removed Insert,Update,Delete), leaving only RetrieveDayEvents, and ReadEvent.
I am having trouble displaying the boundries of my event data. An event 2 days long will not display. An event 2 months long will display BUT I can not navigate to the start or end dates. I get an ASSERT that seems to come from Calendar1300vc80D.dll I am testing with the following code: CXTPCalendarEventsPtr CCalendarSQLDataProvider::RetrieveDayEvents_TestData() { CXTPCalendarEventsPtr pEvents = new CXTPCalendarEvents(); CXTPCalendarEventPtr pEvent = this->CreateNewEvent(); COleDateTimeSpan datOneDay(1.0); //this works COleDateTime datStart(2010,5,20,0,0,0); COleDateTime datEnd(2010,7,20,0,0,0); //this Fails //COleDateTime datStart(COleDateTime::GetCurrentTime()); //COleDateTime datEnd = datStart + datOneDay; ASSERT(datStart.GetStatus()== COleDateTime::valid); ASSERT(datEnd.GetStatus()== COleDateTime::valid); pEvent->SetStartTime(datStart); pEvent->SetEndTime(datEnd); pEvent->SetSubject(_T("Test subject")); pEvent->SetBody(_T("Test subject body")); pEvent->SetAllDayEvent(TRUE); pEvent->SetLocation(_T("Anywhere")); pEvent->SetLabelID(1); pEvent->SetEventID(1); pEvents->Add(pEvent); return pEvents; } any insight would be good. THANKS |
|
It's crackers to slip a rozzer the dropsy in snide
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |