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