CDateTimeCtrl::SetRange
Sets the minimum and maximum allowed system times for a date and time picker control.
BOOL SetRange(
const COleDateTime* pMinRange,
const COleDateTime* pMaxRange
);
BOOL SetRange(
const CTime* pMinRange,
const CTime* pMaxRange
);
Parameters
pMinRange
A pointer to a COleDateTime object or a CTime object containing the earliest time allowed in the CDateTimeCtrl object.pMaxRange
A pointer to a COleDateTime object or a CTime object containing the latest time allowed in the CDateTimeCtrl object.
Return Value
Nonzero if successful; otherwise 0.
Remarks
This member function implements the behavior of the Win32 message DTM_SETRANGE, as described in the Windows SDK. In MFC's implementation, you can specify either COleDateTime or CTime usages. If the COleDateTime object has a NULL status, the range will be removed. If the CTime pointer or the COleDateTime pointer is NULL, the range will be removed.
Example
See the example for CDateTimeCtrl::GetRange.
Requirements
Header: afxdtctl.h