Defines the edge of a date field control the dropdown aligns with.
C
int WINAPI SftDate_GetDropDownAlignment(HWND hwndCtl); BOOL WINAPI SftDate_SetDropDownAlignment(HWND hwndCtl, int alignment);
C++
int CSftDate::GetDropDownAlignment() const; BOOL CSftDate::SetDropDownAlignment(int alignment);
hwndCtl
The window handle of the date field control (SftDate).
alignment
The alignment. alignment can be one of the following values:
| SFTDATE_ALIGN_NEAR | The dropdown aligns with the leading edge of the field (the left edge, or the right edge if the field is laid out from right to left). This is the default. |
| SFTDATE_ALIGN_FAR | The dropdown aligns with the trailing edge of the field. |
GetDropDownAlignment returns the alignment, one of the values listed above.
SetDropDownAlignment returns TRUE if the value is valid, otherwise FALSE.
The GetDropDownAlignment and SetDropDownAlignment functions define and retrieve how the dropdown is placed below the field. A dropdown that doesn't fit on the monitor below the field opens above it and is moved horizontally to stay on the monitor.
The reading order is defined using SetRightToLeft. This function applies to the date field control only. For a month calendar control, GetDropDownAlignment returns SFTDATE_ALIGN_NEAR and SetDropDownAlignment has no effect and returns FALSE.
SftDate_SetButtons(c[i], sel);
break;
case IDC_BORDER:
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;
m_Fields[i].SetButtons(sel);
break;
case IDC_BORDER:
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;See Also C/C++ API | Categories | Notifications