COLORREF GetMonthCalColor( int iColor ) const;
Return Value
A COLORREF value that represents the color setting for the specified portion of the month calendar control if successful. The function returns -1 if unsuccessful.
Parameters
iColor
An int value specifying which color area of the month calendar to retrieve. For a list of values, see the iColor parameter for SetMonthCalColor.
Remarks
This member function implements the behavior of the Win32 message DTM_GETMCCOLOR, as described in the Platform SDK.
Example
void CDatesDlg::OnButton2()
{
// Gain a pointer to the control
CDateTimeCtrl* pCtrl = (CDateTimeCtrl*) GetDlgItem(IDC_DATETIMEPICKER1);
ASSERT(pCtrl != NULL);
// Set the color for the text in the control and
// assure it was set properly. Unlike the GetMonthCalCtrl() member,
// GetMonthCalColor() and SetMonthCalColor() can be used at any time.
pCtrl->SetMonthCalColor(MCSC_TEXT, RGB(255, 0, 0));
VERIFY(pCtrl->GetMonthCalColor(MCSC_TEXT) == RGB(255, 0, 0));
}
CDateTimeCtrl Overview | Class Members | Hierarchy Chart
See Also CDateTimeCtrl::SetMonthCalColor