CMonthCalCtrl::SetCurrentView

Sets the current month calendar control to display the specified view.

BOOL SetCurrentView(
          DWORD dwNewView
);

Parameters

Parameter

Description

[in] dwNewView

One of the following values that specifies a monthly, annual, decade, or century view.

ValueMeaning
MCMV_MONTHMonthly view
MCMV_YEARAnnual view
MCMV_DECADEDecade view
MCMV_CENTURYCentury view

Return Value

true if this method is successful; otherwise, false.

Remarks

This method sends the MCM_SETCURRENTVIEW message, which is described in the Windows SDK.

Requirements

Header: afxdtctl.h

This control is supported in Windows Vista and later.

Additional requirements for this method are described in Build Requirements for Windows Vista Common Controls.

See Also

Concepts

CMonthCalCtrl Class

CMonthCalCtrl Members

Hierarchy Chart

MCM_SETCURRENTVIEW

CMonthCalCtrl::GetCurrentView