CDateTimeCtrl::GetMonthCalColor
Retrieves the color for a given portion of the month calendar within the date and time picker control.
COLORREF GetMonthCalColor(
int iColor
) const;
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.
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.
Remarks
This member function implements the behavior of the Win32 message DTM_GETMCCOLOR, as described in the Windows SDK.
Example
// 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.
m_DateTimeCtrl.SetMonthCalColor(MCSC_TEXT, RGB(255, 0, 0));
VERIFY(m_DateTimeCtrl.GetMonthCalColor(MCSC_TEXT) == RGB(255, 0, 0));
Requirements
Header: afxdtctl.h
See Also
Reference
CDateTimeCtrl::SetMonthCalColor