MonthCal_SetCurSel macro (commctrl.h)

Sets the currently selected date for a month calendar control. If the specified date is not in view, the control updates the display to bring it into view. You can use this macro or send the MCM_SETCURSEL message explicitly.

Syntax

BOOL MonthCal_SetCurSel(
   HWND         hmc,
   LPSYSTEMTIME pst
);

Parameters

hmc

Type: HWND

Handle to a month calendar control.

pst

Type: LPSYSTEMTIME

Pointer to a SYSTEMTIME structure that contains the date to be set as the current selection. The time members of this structure are ignored.

Return value

Type: BOOL

Returns nonzero if successful, or zero otherwise. This macro will fail if applied to a month calendar control that uses the MCS_MULTISELECT style.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header commctrl.h