Partager via


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_MONTH Monthly view
MCMV_YEAR Annual view
MCMV_DECADE Decade view
MCMV_CENTURY Century 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

Reference

CMonthCalCtrl Class

Hierarchy Chart

MCM_SETCURRENTVIEW

CMonthCalCtrl::GetCurrentView

Other Resources

CMonthCalCtrl Members