Print Page | Close Window

How to retrieve calendar event props from click?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=15923
Printed Date: 29 June 2025 at 1:42pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to retrieve calendar event props from click?
Posted By: EricFowler
Subject: How to retrieve calendar event props from click?
Date Posted: 26 December 2009 at 2:33am
I have a calendar in which I have created some events of type CXTPCalendarEventPtr, like this:
CXTPCalendarEventPtr pEvt = EventFromItemAtPoint(pItemDrop, point);
                    if(pEvt)
                    {
                         CXTPCalendarData * pDP = GetDataProvider();
                         if(pDP)
                              pDP->AddEvent(pEvt);
                    }


EventFromItemAtPoint() is mine.

Now the user has selected an event and hit the ENTER key. I trap the message, and want to fight my way back to some custom properties I have stored with that event. The problem is retrieving the pointer for the event that the user has selected.

I tried getting the active view, then a list of CXTPCalendarViewEvents, then one event. But the trail goes cold because I am looking at "view" events, not just events. I may not even be looking in the right place.

Where can I find that lost event? I don't store IDs when I insert.

Eric



Replies:
Posted By: EricFowler
Date Posted: 26 December 2009 at 2:48am
D'oh, figured this one out.

Get the CXTPCalendarViewEvent ptr and call GetEvent() on it. That returns what I need.

Post left up for Google-food.

Eric



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net