CMonthCalCtrl::SetMaxSelCount

BOOL SetMaxSelCount( int nMax );

Return Value

Nonzero if successful; otherwise 0.

Parameters

nMax

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

Remarks

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

Example

// The control needs to have the MCS_MULTISELECT style
// for the following code to work.
void CDatesDlg::OnButton2()
{
   // Gain a pointer to the control
   CMonthCalCtrl* pCtrl = (CMonthCalCtrl*) GetDlgItem(IDC_MONTHCALENDAR1);

   // change the maximum selection count
   pCtrl->SetMaxSelCount(10);

   // check that the change was really made
   ASSERT(pCtrl->GetMaxSelCount() == 10);
}

CMonthCalCtrl OverviewClass MembersHierarchy Chart

See Also   CMonthCalCtrl::GetMaxSelCount