Recurring Events
BCGControlBar Pro (MFC)
BCGSuite (MFC)
BCGControlBar for .NET
The planner control allows you to add appointments, which happen many times according to the given rules. Recurring appointments are very useful for defining events like birthdays, reminders, and others specific to the given time period. The planner automatically offers the following recurring rules: daily, weekly, monthly, and yearly.
In addition, developers can easily create their own rules.
Recurring Appointment:
Edit Recurring Rules:
Sample code:
// Create recurring appointment: every week, on
// Monday, Wednesday and Friday, 9:00 AM - 9:15 AM
CBCGPAppointment* pApp = new CBCGPAppointment
(
COleDateTime::GetCurrentTime (),
COleDateTime::GetCurrentTime (),
_T("Meeting")
);
// Create a new recurring rule:
CBCGPRecurrenceRuleWeekly* pRule = DYNAMIC_DOWNCAST(CBCGPRecurrenceRuleWeekly,
CBCGPPlannerManagerCtrl::CreateRule (BCGP_PLANNER_RULE_WEEKLY));
// 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 |
CBCGPRecurrenceRuleWeekly::BCGP_REC_RULE_WEEKLY_3 |
CBCGPRecurrenceRuleWeekly::BCGP_REC_RULE_WEEKLY_5);
// Assign rule to appointment and free it:
pApp->SetRecurrenceRule (pRule);
delete pRule;
// Add apointment to planner:
m_wndPlanner.AddAppointment (pApp, FALSE, FALSE);