CDateTimeCtrl::GetMonthCalColor
日時指定コントロール内で月間カレンダーの特定の部分の色を取得します。
COLORREF GetMonthCalColor(
int iColor
) const;
パラメーター
- iColor
取得するには、月間カレンダーの任意の色領域を指定する int の値。値の一覧については、SetMonthCalColorについては iColor のパラメーターを参照してください。
戻り値
成功した場合は、月間予定表コントロールの特定の部分の色設定を表す COLORREF の値。関数が失敗した場合は -1 を返します。
解説
このメンバー関数は Windows SDKに記述されている Win32 メッセージの動作を DTM_GETMCCOLOR実行します。
使用例
// 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