Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Calendar
  New Posts New Posts RSS Feed - How to retrieve calendar event props from click?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to retrieve calendar event props from click?

 Post Reply Post Reply
Author
Message
EricFowler View Drop Down
Groupie
Groupie


Joined: 01 December 2009
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote EricFowler Quote  Post ReplyReply Direct Link To This Post Topic: How to retrieve calendar event props from click?
    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
Back to Top
EricFowler View Drop Down
Groupie
Groupie


Joined: 01 December 2009
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote EricFowler Quote  Post ReplyReply Direct Link To This Post 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
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.141 seconds.