www.pudn.com > assigment1.zip > PenColorDlg.cpp


// PenColorDlg.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "myGraphics.h" 
#include "PenColorDlg.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CPenColorDlg dialog 
 
 
CPenColorDlg::CPenColorDlg(CWnd* pParent /*=NULL*/) 
	: CDialog(CPenColorDlg::IDD, pParent) 
{ 
	//{{AFX_DATA_INIT(CPenColorDlg) 
	m_red = 0; 
	m_green = 0; 
	m_blue = 0; 
	//}}AFX_DATA_INIT 
} 
 
 
void CPenColorDlg::DoDataExchange(CDataExchange* pDX) 
{ 
	CDialog::DoDataExchange(pDX); 
	//{{AFX_DATA_MAP(CPenColorDlg) 
	DDX_Text(pDX, IDC_RED, m_red); 
	DDX_Text(pDX, IDC_GREEN, m_green); 
	DDX_Text(pDX, IDC_BLUE, m_blue); 
	//}}AFX_DATA_MAP 
} 
 
 
BEGIN_MESSAGE_MAP(CPenColorDlg, CDialog) 
	//{{AFX_MSG_MAP(CPenColorDlg) 
	ON_BN_CLICKED(IDC_RESET, OnReset) 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CPenColorDlg message handlers 
 
void CPenColorDlg::OnReset()  
{ 
	m_red = 0; 
	m_green = 0; 
	m_blue = 0; 
	UpdateData(FALSE);  
}