// CWfColorDialog.cpp : implementation file
//

#include "stdafx.h"
#include "CWfColorDialog.h"


// CWfColorDialog dialog

IMPLEMENT_DYNAMIC(CWfColorDialog, CaplTranslateDialog)

CWfColorDialog::CWfColorDialog(CWnd* pParent /*=NULL*/)
	: CaplTranslateDialog(CWfColorDialog::IDD, pParent)
{

}

CWfColorDialog::~CWfColorDialog()
{
}

void CWfColorDialog::DoDataExchange(CDataExchange* pDX)
{
	CaplTranslateDialog::DoDataExchange(pDX);
	DDX_Control(pDX, IDC_ST_OVERDUE, m_st_overdue);
	DDX_Control(pDX, IDC_ST_OVERDUE1, m_st_overdue1);
	DDX_Control(pDX, IDC_ST_ENDS, m_st_ends);
	DDX_Control(pDX, IDC_ST_ENDS1, m_st_ends1);
	DDX_Control(pDX, IDC_ST_MUCH_TIME, m_st_much_time);
	DDX_Control(pDX, IDC_ST_MUCH_TIME1, m_st_much_time1);
	DDX_Control(pDX, IDC_ST_END_OVERDUE, m_st_end_overdue);
	DDX_Control(pDX, IDC_ST_END_OVERDUE1, m_st_end_overdue1);
	DDX_Control(pDX, IDC_ST_END_EARLIER, m_st_end_earlier);
	DDX_Control(pDX, IDC_ST_END_EARLIER1, m_st_end_earlier1);
	DDX_Control(pDX, IDC_ST_END_IN_TIME, m_st_end_in_time);
	DDX_Control(pDX, IDC_ST_END_IN_TIME1, m_st_end_in_time1);
}


BEGIN_MESSAGE_MAP(CWfColorDialog, CaplTranslateDialog)
END_MESSAGE_MAP()


// CWfColorDialog message handlers

BOOL CWfColorDialog::OnInitDialog()
{
	CaplTranslateDialog::OnInitDialog();

	static COLORREF color_overdue=RGB(255,0,0);
	static COLORREF color_ends=RGB(255,128,0);
	static COLORREF color_much_time=RGB(0,128,0);
	static COLORREF color_much_time_end=RGB(64,128,64);

	static COLORREF color_end_overdue=aplColor_MixColor(color_overdue,RGB(128,128,128),75);
	static COLORREF color_end_earlier=aplColor_MixColor(color_much_time_end,RGB(128,128,128),75);
	static COLORREF color_end_in_time=RGB(128,128,128);

	m_st_overdue1.SetBackgroundColor(color_overdue,FALSE);
	m_st_overdue.SetBackgroundColor(aplColor_GetHilightColor(color_overdue,50),FALSE);

	m_st_ends1.SetBackgroundColor(color_ends,FALSE);
	m_st_ends.SetBackgroundColor(aplColor_GetHilightColor(color_ends,50),FALSE);

	m_st_much_time1.SetBackgroundColor(color_much_time,FALSE);
	m_st_much_time.SetBackgroundColor(aplColor_GetHilightColor(color_much_time,50),FALSE);


	m_st_end_overdue1.SetBackgroundColor(color_end_overdue,FALSE);
	m_st_end_overdue.SetBackgroundColor(aplColor_GetHilightColor(color_end_overdue,50),FALSE);

	m_st_end_earlier1.SetBackgroundColor(color_end_earlier,FALSE);
	m_st_end_earlier.SetBackgroundColor(aplColor_GetHilightColor(color_end_earlier,50),FALSE);

	m_st_end_in_time1.SetBackgroundColor(color_end_in_time,FALSE);
	m_st_end_in_time.SetBackgroundColor(aplColor_GetHilightColor(color_end_in_time,50),FALSE);


	return TRUE;  // return TRUE unless you set the focus to a control
	// EXCEPTION: OCX Property Pages should return FALSE
}
