CDateTimeCtrl::SetMonthCalColor

COLORREF SetMonthCalColor( int iColor, COLORREF ref );

Return Value

A COLORREF value that represents the previous color setting for the specified portion of the month calendar control if successful. Otherwise, the message returns -1.

Parameters

iColor

int value specifying which area of the month calendar control to set. This value can be one of the following.

Value Meaning
MCSC_BACKGROUND Set the background color displayed between months.
MCSC_MONTHBK Set the background color displayed within a month.
MCSC_TEXT Set the color used to display text within a month.
MCSC_TITLEBK Set the background color displayed in the calendar's title.
MCSC_TITLETEXT Set the color used to display text within the calendar's title.
MCSC_TRAILINGTEXT Set the color used to display header and trailing-day text. Header and trailing days are the days from the previous and following months that appear on the current calendar.

ref

A COLORREF value representing the color that will be set for the specified area of the month calendar.

Remarks

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

Example

See the example for CDateTimeCtrl::GetMonthCalColor.

CDateTimeCtrl OverviewClass MembersHierarchy Chart

See Also   CDateTimeCtrl::GetMonthCalColor