Defines the number of rows of months shown.
C
int WINAPI SftDate_GetMonthsDown(HWND hwndCtl); BOOL WINAPI SftDate_SetMonthsDown(HWND hwndCtl, int months);
C++
int CSftDate::GetMonthsDown() const; int CSftCalendar::GetMonthsDown() const; BOOL CSftDate::SetMonthsDown(int months); BOOL CSftCalendar::SetMonthsDown(int months);
hwndCtl
The window handle of the month calendar control (SftCalendar), or of the date field control (SftDate) whose dropdown calendar is affected.
months
The number of rows of months, 1 through 12.
GetMonthsDown returns the number of rows of months.
SetMonthsDown returns TRUE if the value is valid, otherwise FALSE.
The GetMonthsDown and SetMonthsDown functions define and retrieve the number of rows of months a calendar shows. The default is 1. SetMonthsAcross defines the number of months in each row.
A month calendar control that sizes itself (SetAutoSize, the default) takes the size of all months.
The setting applies to a month calendar control and to the dropdown calendar of a date field control.
case IDC_ALIGNMENT:
for (i = 0; i < FIELDS; ++i)
SftDate_SetDropDownAlignment(c[i], sel);
break;
case IDC_ACROSS:
SftDate_SetMonthsAcross(hwndCal, sel + 1);
break;
case IDC_DOWN:
SftDate_SetMonthsDown(hwndCal, sel + 1);
break;
case IDC_WEEKNUMBERS:
for (i = 0; i < CONTROLS; ++i) {
SftDate_SetShowWeekNumbers(c[i], sel > 0);
SftDate_SetWeekNumberRule(c[i], sel == 2 ? SFTDATE_WEEKRULE_ISO8601 : SFTDATE_WEEKRULE_CULTURE);
}
break;
case IDC_ALIGNMENT:
for (int i = 0; i < FIELDS; ++i)
m_Fields[i].SetDropDownAlignment(sel);
break;
case IDC_ACROSS:
m_Calendar.SetMonthsAcross(sel + 1);
break;
case IDC_DOWN:
m_Calendar.SetMonthsDown(sel + 1);
break;
case IDC_WEEKNUMBERS:
for (int i = 0; i < CONTROLS; ++i) {
Control(i).SetShowWeekNumbers(sel > 0);
Control(i).SetWeekNumberRule(sel == 2 ? SFTDATE_WEEKRULE_ISO8601 : SFTDATE_WEEKRULE_CULTURE);
}
break;See Also C/C++ API | Categories | Notifications