Defines the maximum number of days the user can select in range selection mode.
C
int WINAPI SftDate_GetMaxRangeDays(HWND hwndCtl); BOOL WINAPI SftDate_SetMaxRangeDays(HWND hwndCtl, int days);
C++
int CSftDate::GetMaxRangeDays() const; int CSftCalendar::GetMaxRangeDays() const; BOOL CSftDate::SetMaxRangeDays(int days); BOOL CSftCalendar::SetMaxRangeDays(int days);
hwndCtl
The window handle of the month calendar control (SftCalendar), or of the date field control (SftDate) whose dropdown calendar is affected.
days
The maximum number of days in a range, or 0 for no limit.
GetMaxRangeDays returns the maximum number of days, or 0.
SetMaxRangeDays returns TRUE if the value is valid (0 or greater), otherwise FALSE.
The GetMaxRangeDays and SetMaxRangeDays functions define and retrieve the maximum length of a range the user can select (SetSelectionMode with SFTDATE_SELECTION_RANGE). The default is 0, no limit. A range that would be longer ends at the maximum.
The limit applies to the user's selection only, not to a range set using SetRange.
The setting applies to a month calendar control and to the dropdown calendar of a date field control.
See Also C/C++ API | Categories | Notifications