www.gusucode.com > VC++增强型“画图版”及图像处理程序源码程序 > VC++增强型“画图版”及图像处理程序源码程序\code\SetDlg2.cpp
// SetDlg2.cpp : implementation file // Download by http://www.NewXing.com // Download by http://www.NewXing.com #include "stdafx.h" #include "毕业设计.h" #include "SetDlg2.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CSetDlg2 dialog CSetDlg2::CSetDlg2(CWnd* pParent /*=NULL*/) : CDialog(CSetDlg2::IDD, pParent) { //{{AFX_DATA_INIT(CSetDlg2) m_n = 0; //}}AFX_DATA_INIT } void CSetDlg2::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CSetDlg2) DDX_Text(pDX, IDC_EDIT1, m_n); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CSetDlg2, CDialog) //{{AFX_MSG_MAP(CSetDlg2) ON_BN_CLICKED(IDC_BUTTON1, OnButton1) ON_BN_CLICKED(IDC_BUTTON3, OnButton3) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CSetDlg2 message handlers void CSetDlg2::OnButton1() { // TODO: Add your control notification handler code here OnOK(); } void CSetDlg2::OnButton3() { // TODO: Add your control notification handler code here OnCancel(); } void CSetDlg2::OnOK(){ if(UpdateData()){ CDialog::OnOK(); } } BOOL CSetDlg2::OnInitDialog() { CDialog::OnInitDialog(); // TODO: Add extra initialization here CWnd * w = GetDlgItem(IDC_EDIT1); w->SetFocus(); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }