Compartilhar via


OlDaysOfWeek

Windows Mobile SupportedWindows Embedded CE Supported

9/8/2008

The OlDaysOfWeek enumeração identifica os dias usados em um objeto IRecurrencePattern.

Syntax

enum OlDaysOfWeek {
  olSunday    = 1,
  olMonday    = 2,
  olTuesday   = 4,
  olWednesday = 8,
  olThursday  = 16,
  olFriday    = 32,
  olSaturday  = 64
};

Elements

  • olSunday
    Uma recorrência semanal todo domingo.
  • olMonday
    Uma recorrência semanal todas as segundas-feiras.
  • olTuesday
    Uma recorrência semanal todas as terças-feiras.
  • olWednesday
    Uma recorrência semanal às quartas-feiras.
  • olThursday
    Uma recorrência semanal todas as quintas-feiras.
  • olFriday
    Uma recorrência semanal toda sexta-feira.
  • olSaturday
    Uma recorrência semanal todos os sábados.

Remarks

Os valores nessa enumeração são em uma seqüência que dobra entre valores. Isso permite que você especificar combinações de múltiplo valores combinando individual valores com o bit a bit Ou. De exemplo, o valor 6 é interpretada para significar tanto 2 e 4 juntos.

Exemplo de código

O seguinte exemplo de código demonstra como definir uma recorrência semanal ocorrendo cada segunda e terça-feira. pRecurrence é um ponteiro para um item do tipo IRecurrencePattern.

Observação

Para tornar o exemplo de código mais fácil para ler, verificação de segurança e manipulação de erro não estão incluídos.This code example should not be used in a release configuration unless it has been modified to include them.

IAppointment *pAppt;             // The Appointment item.
IRecurrencePattern *pRecurrence; // The Recurrence Pattern.
SYSTEMTIME st;                   // A System Time Object.
DATE date;                       // A DATE object.

// Create an Appointment item from the POOM Application object.
hr = polApp->CreateItem(olAppointmentItem, (IDispatch**)&pAppt);

// Create a DATE object representing the date Thursday, May 10th, 2007, 8:00 PM.
memset(&st, 0, sizeof(SYSTEMTIME));

st.wMonth = 5;
st.wDay   = 10;
st.wYear  = 2007;
st.wHour  = 20;

hr = polApp->SystemTimeToVariantTime(&st, &date);

// Set the appointment's subject and start date.
hr = pAppt->put_Subject(TEXT("Test Appointment"));
hr = pAppt->put_Start(date);

// Set the RecurrencePattern on the appointment.
hr = pAppt->GetRecurrencePattern(&pRecurrence);
hr = pRecurrence->put_RecurrenceType(olRecursWeekly);
hr = pRecurrence->put_DayOfWeekMask(olMonday | olTuesday);
hr = pRecurrence->put_NoEndDate(VARIANT_TRUE);

// Save the Appointment item.
pAppt->Save();

Requirements

Header pimstore.h
Library Pimstore.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Pocket PC 2000 and later, Smartphone 2002 and later

See Also

Tasks

Creating a Recurring Appointment

Reference

Pocket Outlook Object Model Interfaces
IRecurrencePattern

Other Resources

Pocket Outlook Object Model Enumerations
Pocket Outlook Object Model Common Tasks