// ColorReduce.cpp : implementation file
//

#include "stdafx.h"
#include "TCTb.h"
#include "ColorReduce.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CColorReduce dialog


CColorReduce::CColorReduce(CWnd* pParent /*=NULL*/)
: CDialog(CColorReduce::IDD, pParent)
{
	rmd=RMD_MAX;
	//{{AFX_DATA_INIT(CColorReduce)
	// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CColorReduce::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CColorReduce)
	// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CColorReduce, CDialog)
//{{AFX_MSG_MAP(CColorReduce)
ON_BN_CLICKED(IDC_ALPHACHAN, OnAlphachan)
ON_BN_CLICKED(IDC_BLUECHAN, OnBluechan)
ON_BN_CLICKED(IDC_BRIGHTNESS, OnBrightness)
ON_BN_CLICKED(IDC_GREENCHAN, OnGreenchan)
ON_BN_CLICKED(IDC_PEAKS, OnPeaks)
ON_BN_CLICKED(IDC_REDCHAN, OnRedchan)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CColorReduce message handlers

void CColorReduce::OnAlphachan() 
{
	rmd=RMD_ALPHAC;
}

void CColorReduce::OnBluechan() 
{
	rmd=RMD_BLUEC;
}

void CColorReduce::OnBrightness() 
{
	rmd=RMD_BHT;
}

void CColorReduce::OnGreenchan() 
{
	rmd=RMD_GREENC;
}

void CColorReduce::OnPeaks() 
{
	rmd=RMD_MAX;
}

void CColorReduce::OnRedchan() 
{
	rmd=RMD_REDC;
}

BOOL CColorReduce::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
    CheckDlgButton( IDC_PEAKS, TRUE );
	
	return TRUE;  // return TRUE unless you set the focus to a control
	// EXCEPTION: OCX Property Pages should return FALSE
}
