Defines the font of the days and names of a calendar.
C
HFONT WINAPI SftDate_GetCalendarFont(HWND hwndCtl); void WINAPI SftDate_SetCalendarFont(HWND hwndCtl, HFONT hFont);
C++
HFONT CSftDate::GetCalendarFont() const; HFONT CSftCalendar::GetCalendarFont() const; void CSftDate::SetCalendarFont(HFONT hFont); void CSftCalendar::SetCalendarFont(HFONT hFont);
hwndCtl
The window handle of the month calendar control (SftCalendar), or of the date field control (SftDate) whose dropdown calendar is affected.
hFont
The font, or NULL to use the control's font.
GetCalendarFont returns the font defined using SetCalendarFont, or NULL.
The GetCalendarFont and SetCalendarFont functions define and retrieve the font of a calendar. By default (NULL) a calendar uses the control's font, defined using WM_SETFONT, or the Windows message font.
The bold version of the font is used for special dates and the title, unless a title font is defined using SetTitleFont.
The application retains ownership of the font, which must remain valid as long as the control uses it. The font is defined for the DPI of the control (GetDPI); the dropdown calendar of a date field control scales it if the dropdown opens on a monitor with another DPI.
The setting applies to a month calendar control and to the dropdown calendar of a date field control.
See Also C/C++ API | Categories | Notifications