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;
Параметры
- 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.
Возвращаемое значение
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.
Заметки
This member function implements the behavior of the Win32 message DTM_GETMCCOLOR, as described in the Windows SDK.
Пример
// 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));
Требования
Header: afxdtctl.h