Freigeben über


CDateTimeCtrl::CloseMonthCal

Closes the current date and time picker control.

void CloseMonthCal() const;

Remarks

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

Example

The following code example defines the variable, m_dateTimeCtrl, that is used to programmatically access the date and time picker control. This variable is used in the next example.

    // Variable to access date-time control.
    CDateTimeCtrl m_dateTimeCtrl;
    // Variable to access the splitbutton control
    CSplitButton m_splitbutton;

The following code example closes the drop-down calendar for the current date and time picker control.

void CCDateTimeCtrl_s1Dlg::OnXClosemonthcal()
{
    // Close the month calendar control dropdown.
    m_dateTimeCtrl.CloseMonthCal();
}

Requirements

Header: afxdtctl.h

This method is supported in Windows Vista and later.

See Also

Reference

CDateTimeCtrl Class

Hierarchy Chart

DTM_CLOSEMONTHCAL