Finds the special date that applies to a day.
C
int WINAPI SftDate_FindSpecialDate(HWND hwndCtl, const SYSTEMTIME* lpDate);
C++
int CSftDate::FindSpecialDate(const SYSTEMTIME* lpDate); int CSftCalendar::FindSpecialDate(const SYSTEMTIME* lpDate);
hwndCtl
The window handle of the month calendar control (SftCalendar), or of the date field control (SftDate) whose dropdown calendar is affected.
lpDate
A pointer to a SYSTEMTIME structure that holds the day. The time is ignored.
The return value is the zero-based index of the first special date that applies to the day, or -1 if none applies or lpDate is not a valid date.
The FindSpecialDate function finds the special date the calendar uses for a day, taking the recurrence of each special date into account. A weekly special date applies to every day with the same day of the week, a monthly one to the same day of every month and an annual one to the same day and month of every year, earlier years included. Monthly and annual recurrences use the calendar system of the control's culture (SetCulture).
The same index is passed in the specialDate member of the NM_SFTDATE_DAYFORMATTING notification. Special dates apply to a month calendar control and to the dropdown calendar of a date field control.
See Also C/C++ API | Categories | Notifications