Udostępnij za pośrednictwem


CMonthCalCtrl::GetSelRange

Retrieves date information representing the upper and lower limits of the date range currently selected by the user.

BOOL GetSelRange( 
   COleDateTime& refMinRange, 
   COleDateTime& refMaxRange  
) const; 
BOOL GetSelRange( 
   CTime& refMinRange, 
   CTime& refMaxRange  
) const; 
BOOL GetSelRange( 
   LPSYSTEMTIME pMinRange, 
   LPSYSTEMTIME pMaxRange  
) const;

Parameters

  • refMinRange
    A reference to a COleDateTime or CTime object containing the minimum date allowed.

  • refMaxRange
    A reference to a COleDateTime or CTime object containing the maximum date allowed.

  • pMinRange
    A pointer to a SYSTEMTIME structure containing the date at the lowest end of the range.

  • pMaxRange
    A pointer to a SYSTEMTIME structure containing the date at the highest end of the range.

Return Value

Nonzero if successful; otherwise 0.

Remarks

This member function implements the behavior of the Win32 message MCM_GETSELRANGE, as described in the Windows SDK. GetSelRange will fail if applied to a month calendar control that does not use the MCS_MULTISELECT style.

In MFC's implementation of GetSelRange, you can specify COleDateTime usage, a CTime usage, or a SYSTEMTIME structure usage.

Requirements

Header: afxdtctl.h

See Also

Reference

CMonthCalCtrl Class

Hierarchy Chart

CMonthCalCtrl::SetSelRange

Other Resources

CMonthCalCtrl Members