CDateTimeCtrl::SetRange

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

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

Return Value

Nonzero if successful; otherwise 0.

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.

Remarks

This member function implements the behavior of the Win32 message DTM_SETRANGE, as described in the Platform 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.

CDateTimeCtrl OverviewClass MembersHierarchy Chart

See Also   CDateTimeCtrl::GetRange