The planner control allows to add appointment which happens many times according to the given rules. Recurring appointments are very useful for defining events like birthdays, reminders and other events specific to the given time period. The planner provides out of the box the following recurring rules: daily, weekly, monthly and yearly.
In addition, a developer can easily create his own rules.
|// Create recurring appointment: every week, on
// Monday, Wednesday and Friday, 9:00 AM - 9:15 AM
CBCGPAppointment* pApp = new CBCGPAppointment
// Create a new recurring rule:
CBCGPRecurrenceRuleWeekly* pRule = DYNAMIC_DOWNCAST(CBCGPRecurrenceRuleWeekly,
// Set time:
pRule->SetDateStart (COleDateTime::GetCurrentTime ());
pRule->SetTimeInterval (COleDateTimeSpan (0, 9, 0, 0), COleDateTimeSpan (0, 9, 15, 0));
// Set days when this appointment should occure:
pRule->SetDays (CBCGPRecurrenceRuleWeekly::BCGP_REC_RULE_WEEKLY_1 |
// Assign rule to appointment and free it:
// Add apointment to planner:
m_wndPlanner.AddAppointment (pApp, FALSE, FALSE);