19,468
社区成员
发帖
与我相关
我的任务
分享
#if !defined(AFX_TESTDLG1_H__36273751_3DE5_4B1F_9453_EFBA7CF6CAB9__INCLUDED_)
#define AFX_TESTDLG1_H__36273751_3DE5_4B1F_9453_EFBA7CF6CAB9__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// TestDlg1.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CTestDlg1 dialog
class CTestDlg1 : public CDialog
{
// Construction
public:
CTestDlg1(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CTestDlg1)
enum { IDD = IDD_DIALOG1 };
int m_X;
int m_Y;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTestDlg1)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CTestDlg1)
virtual BOOL OnInitDialog();
virtual void OnOK();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TESTDLG1_H__36273751_3DE5_4B1F_9453_EFBA7CF6CAB9__INCLUDED_)
//
// TestDlg1.cpp : implementation file
//
#include "stdafx.h"
#include "MainFrm.h" // add new code by Alex0513
#include "YaChangeSplit.h"
#include "TestDlg1.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTestDlg1 dialog
CTestDlg1::CTestDlg1(CWnd* pParent /*=NULL*/)
: CDialog(CTestDlg1::IDD, pParent)
{
//{{AFX_DATA_INIT(CTestDlg1)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CTestDlg1::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CTestDlg1)
DDX_Text(pDX, IDC_EDIT1, m_X); //add new code by Alex0513
DDX_Text(pDX, IDC_EDIT2, m_Y);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CTestDlg1, CDialog)
//{{AFX_MSG_MAP(CTestDlg1)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTestDlg1 message handlers
BOOL CTestDlg1::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
m_X=2;
m_Y=2;
UpdateData(FALSE);
//
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CTestDlg1::OnOK()
{
// TODO: Add extra validation here
CDialog::OnOK();
#ifdef _DEBUG
afxDump << m_X << ";" << m_Y << "\n";
#endif
}