Поделиться через


CMonthCalCtrl::SetRange

Sets the minimum and maximum allowable dates for a month calendar control.

BOOL SetRange(
   const COleDateTime* pMinRange,
   const COleDateTime* pMaxRange 
);
BOOL SetRange(
   const CTime* pMinRange,
   const CTime* pMaxRange 
);
BOOL SetRange(
   const LPSYSTEMTIME pMinRange,
   const LPSYSTEMTIME pMaxRange 
);

Параметры

  • pMinRange
    A pointer to a COleDateTime object, a CTime object, or SYSTEMTIME structure containing the date at the lowest end of the range.

  • pMaxRange
    A pointer to a COleDateTime object, a CTime object, or SYSTEMTIME structure containing the date at the highest end of the range.

Возвращаемое значение

Nonzero if successful; otherwise 0.

Заметки

This member function implements the behavior of the Win32 message MCM_SETRANGE, as described in the Windows SDK. In MFC's implementation of SetRange, you can specify COleDateTime usage, a CTime usage, or a SYSTEMTIME structure usage.

Пример

See the example for CMonthCalCtrl::GetRange.

Требования

Header: afxdtctl.h

См. также

Основные понятия

CMonthCalCtrl Class

CMonthCalCtrl Members

Hierarchy Chart

CMonthCalCtrl::GetRange