HeaderPane
Main
Hide
Share Link
Print

FocusedDate

Defines the date that has the keyboard focus in a month calendar control.

C

BOOL WINAPI SftDate_GetFocusedDate(HWND hwndCtl, LPSYSTEMTIME lpValue);
BOOL WINAPI SftDate_SetFocusedDate(HWND hwndCtl, const SYSTEMTIME* lpValue);

C++

BOOL CSftCalendar::GetFocusedDate(LPSYSTEMTIME lpValue) const;
BOOL CSftCalendar::SetFocusedDate(const SYSTEMTIME* lpValue);

Parameters

hwndCtl

The window handle of the month calendar control (SftCalendar).

lpValue

GetFocusedDate: a pointer to a SYSTEMTIME structure that receives the date.
SetFocusedDate: a pointer to a SYSTEMTIME structure that holds the date.

Returns

The return value is TRUE if successful, or FALSE if hwndCtl is not a month calendar control or lpValue is not a valid date.

Comments

The GetFocusedDate and SetFocusedDate functions define and retrieve the date that has the keyboard focus, the starting point of the arrow keys. It is marked when the control has the input focus. The focused date is not the selected date (GetValue): the user moves the focus with the arrow keys and selects with Space or Enter (see Keyboard Interface).

SetFocusedDate moves a date outside the range defined using SetMinDate and SetMaxDate into it and scrolls the date into view. The time is ignored. A new month calendar control focuses the current date.

This function applies to the month calendar control only. For a date field control, GetFocusedDate returns FALSE and SetFocusedDate has no effect and returns FALSE.

SYSTEMTIME values are always Gregorian dates, regardless of the calendar system of the control's culture (SetCulture).

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


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