Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Calendar
  New Posts New Posts RSS Feed - Create Event Exception
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Create Event Exception

 Post Reply Post Reply
Author
Message
WaaZ View Drop Down
Senior Member
Senior Member


Joined: 31 January 2006
Location: United Kingdom
Status: Offline
Points: 103
Post Options Post Options   Thanks (0) Thanks(0)   Quote WaaZ Quote  Post ReplyReply Direct Link To This Post Topic: Create Event Exception
    Posted: 31 January 2006 at 8:18am

Hi,

I wish to know, if I have a CalendarEvent "myEvent" with a recurrence object, and I wish to add an exception without the user clicking on the form.

Normally, if I can get hold of an event of state (CalendarEventRecurrenceState.xtpCalendarRecurrenceOccurrence), I can make it as an exception. How will I get hold of such an instance of calendarEvent, or how can I replicate my MasterEvent so that I can make another event of state (CalendarEventRecurrenceState.xtpCalendarRecurrenceException) under this particular event.

Thnx in advance for ur collaboration

WaaZ

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 31 January 2006 at 1:36pm
Hi,

The idea is the folowing:

- You have an instance of event occurrence (you can get it by HitTest or in another way).
Recurrence state == xtpCalendarRecurrenceOccurrence      ; 

- Call pEvent.MakeAsRException() to change recurrence state (and store original occurrence Start/End times in separate members)

- Than you may change other pEvent properties.

- To commit your changes call pCalendar.DataProvider.ChangeEvent(pEvent)

That's it.

btw, if you enable "Show hidden members" option of the Object Browser, some other class members will be visible for you. They might sometimes be useful for extended operations.

--
WBR,
Serge
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.