www.gusucode.com > VC++增强型“画图版”及图像处理程序源码程序 > VC++增强型“画图版”及图像处理程序源码程序\code\MySetDlg.cpp
//Download by http://www.NewXing.com // MySetDlg.cpp : implementation file // #include "stdafx.h" #include "毕业设计.h" #include "MySetDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CMySetDlg dialog CMySetDlg::CMySetDlg(CWnd* pParent /*=NULL*/) : CDialog(CMySetDlg::IDD, pParent) { //{{AFX_DATA_INIT(CMySetDlg) m_m = 0; //}}AFX_DATA_INIT } void CMySetDlg::OnOK(){ if(UpdateData()){ CDialog::OnOK(); } } void CMySetDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CMySetDlg) DDX_Text(pDX, IDC_EDIT1, m_m); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CMySetDlg, CDialog) //{{AFX_MSG_MAP(CMySetDlg) ON_BN_CLICKED(IDC_BUTTON1, OnButton1) ON_BN_CLICKED(IDC_BUTTON2, OnButton2) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CMySetDlg message handlers BOOL CMySetDlg::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 } void CMySetDlg::OnButton1() { // TODO: Add your control notification handler code here OnOK(); } void CMySetDlg::OnButton2() { // TODO: Add your control notification handler code here OnCancel(); }