Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Calendar
  New Posts New Posts RSS Feed - Calendar not displaying End Points for events
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Calendar not displaying End Points for events

 Post Reply Post Reply
Author
Message
madalfred View Drop Down
Newbie
Newbie


Joined: 30 June 2010
Location: Australia
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote madalfred Quote  Post ReplyReply Direct Link To This Post Topic: Calendar not displaying End Points for events
    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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.