CMonthCalCtrl::SetMaxSelCount

Sets the maximum number of days that can be selected in a month calendar control.

BOOL SetMaxSelCount(
   int nMax 
);

Parameters

  • nMax
    The value that will be set to represent the maximum number of selectable days.

Return Value

Nonzero if successful; otherwise 0.

Remarks

This member function implements the behavior of the Win32 message MCM_SETMAXSELCOUNT, as described in the Windows SDK.

Example

// The control needs to have the MCS_MULTISELECT style
// for the following code to work.

// change the maximum selection count
m_calCtrl2.SetMaxSelCount(10);

// check that the change was really made
ASSERT(m_calCtrl2.GetMaxSelCount() == 10);

Requirements

Header: afxdtctl.h

See Also

Reference

CMonthCalCtrl Class

Hierarchy Chart

CMonthCalCtrl::GetMaxSelCount

Other Resources

CMonthCalCtrl Members