Defines the number of months shown side by side.
C
int WINAPI SftDate_GetMonthsAcross(HWND hwndCtl); BOOL WINAPI SftDate_SetMonthsAcross(HWND hwndCtl, int months);
C++
int CSftDate::GetMonthsAcross() const; int CSftCalendar::GetMonthsAcross() const; BOOL CSftDate::SetMonthsAcross(int months); BOOL CSftCalendar::SetMonthsAcross(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 months shown side by side, 1 through 12.
GetMonthsAcross returns the number of months shown side by side.
SetMonthsAcross returns TRUE if the value is valid, otherwise FALSE.
The GetMonthsAcross and SetMonthsAcross functions define and retrieve the number of months a calendar shows side by side. The default is 1. SetMonthsDown defines the number of rows, so a calendar shows MonthsAcross times MonthsDown months.
A month calendar control that sizes itself (SetAutoSize, the default) takes the size of all months. GetSingleMonthSize returns the size of one month.
The year, decade and century views show the same number of blocks, each covering a year, a decade or a century.
The setting applies to a month calendar control and to the dropdown calendar of a date field control.
for (i = 0; i < FIELDS; ++i)
SftDate_SetBorderStyle(c[i], g_borderStyles[sel]);
break;
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);
for (int i = 0; i < FIELDS; ++i)
m_Fields[i].SetBorderStyle(g_borderStyles[sel]);
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);See Also C/C++ API | Categories | Notifications