HeaderPane
Main
Hide
Share Link
Print

RangeSeparator

Defines the text shown between the two dates of a date field control in range selection mode.

C

int SftDate_GetRangeSeparator(HWND hwndCtl, LPTSTR lpszText, int cchMax);
int WINAPI SftDate_GetRangeSeparator_A(HWND hwndCtl, LPSTR lpszText, int cchMax);
int WINAPI SftDate_GetRangeSeparator_W(HWND hwndCtl, LPWSTR lpszText, int cchMax);
void SftDate_SetRangeSeparator(HWND hwndCtl, LPCTSTR lpszText);
void WINAPI SftDate_SetRangeSeparator_A(HWND hwndCtl, LPCSTR lpszText);
void WINAPI SftDate_SetRangeSeparator_W(HWND hwndCtl, LPCWSTR lpszText);

C++

int CSftDate::GetRangeSeparator(LPTSTR lpszText, int cchMax) const;
CString CSftDate::GetRangeSeparator() const;
void CSftDate::SetRangeSeparator(LPCTSTR lpszText);

Parameters

hwndCtl

The window handle of the date field control (SftDate).

lpszText

Get: a pointer to the buffer that receives the text, or NULL to retrieve the length of the text.
Set: a pointer to the new text. NULL is the same as an empty text.

cchMax

The size of the buffer in characters, including the terminating null character.

Returns

The Get function returns the number of characters copied to the buffer, not including the terminating null character. If the buffer is NULL or cchMax is 0, it returns the length of the text instead, so an application can allocate a buffer of the required size (the length plus one). A text longer than the buffer is truncated.

Comments

The GetRangeSeparator and SetRangeSeparator functions define and retrieve the text a date field control shows between the first and last date of a range (SetSelectionMode with SFTDATE_SELECTION_RANGE). The default is an en dash with a space on either side.

Text typed in free-form editing (SetEditStyle) separates the dates with this text or with an en dash. This function applies to the date field control only. For a month calendar control, GetRangeSeparator returns 0 and SetRangeSeparator has no effect.

SftDate.h maps the name without suffix to the _A (ANSI) or _W (Unicode) function, depending on whether UNICODE or _UNICODE is defined. The ANSI functions convert the text using the system code page.

See Also C/C++ API | Categories | Notifications


Last Updated 11/26/2026 - (email)
© 2026 Softel vdm, Inc.