HeaderPane
Main
Hide
Share Link
Print

CalendarClearText

Defines the text of the Clear button of a calendar.

C

int SftDate_GetCalendarClearText(HWND hwndCtl, LPTSTR lpszText, int cchMax);
int WINAPI SftDate_GetCalendarClearText_A(HWND hwndCtl, LPSTR lpszText, int cchMax);
int WINAPI SftDate_GetCalendarClearText_W(HWND hwndCtl, LPWSTR lpszText, int cchMax);
void SftDate_SetCalendarClearText(HWND hwndCtl, LPCTSTR lpszText);
void WINAPI SftDate_SetCalendarClearText_A(HWND hwndCtl, LPCSTR lpszText);
void WINAPI SftDate_SetCalendarClearText_W(HWND hwndCtl, LPCWSTR lpszText);

C++

int CSftDate::GetCalendarClearText(LPTSTR lpszText, int cchMax) const;
int CSftCalendar::GetCalendarClearText(LPTSTR lpszText, int cchMax) const;
CString CSftDate::GetCalendarClearText() const;
CString CSftCalendar::GetCalendarClearText() const;
void CSftDate::SetCalendarClearText(LPCTSTR lpszText);
void CSftCalendar::SetCalendarClearText(LPCTSTR lpszText);

Parameters

hwndCtl

The window handle of the month calendar control (SftCalendar), or of the date field control (SftDate) whose dropdown calendar is affected.

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 GetCalendarClearText and SetCalendarClearText functions define and retrieve the text of the Clear button shown below the months (SetCalendarClearButton). The default is "Clear". Screen readers also announce this text for the Clear button of a date field control (SetShowClearButton).

The setting applies to a month calendar control and to the dropdown calendar of a date field control.

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.