exchangdialog.cpp

来自「vc++例子 学习过程中制作 对话框 按纽 编程实例」· C++ 代码 · 共 67 行

CPP
67
字号
// ExchangDialog.cpp : implementation file
//

#include "stdafx.h"
#include "Ex1001.h"
#include "ExchangDialog.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CExchangDialog dialog


CExchangDialog::CExchangDialog(CWnd* pParent /*=NULL*/)
	: CDialog(CExchangDialog::IDD, pParent)
{
	//{{AFX_DATA_INIT(CExchangDialog)
	m_ShowString = _T("");
	m_xPosition = 0;
	m_yPosition = 0;
	//}}AFX_DATA_INIT
}


void CExchangDialog::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CExchangDialog)
	DDX_Text(pDX, IDC_CHANGESTRING, m_ShowString);
	DDV_MaxChars(pDX, m_ShowString, 30);
	DDX_Text(pDX, IDC_EDIT1, m_xPosition);
	DDX_Text(pDX, IDC_EDIT2, m_yPosition);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CExchangDialog, CDialog)
	//{{AFX_MSG_MAP(CExchangDialog)
	ON_EN_CHANGE(IDC_EDIT2, OnChangeEdit2)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CExchangDialog message handlers

void CExchangDialog::OnOK() 
{
	// TODO: Add extra validation here
	UpdateData(TRUE);
	CDialog::OnOK();
}

void CExchangDialog::OnChangeEdit2() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function and call CRichEditCtrl().SetEventMask()
	// with the ENM_CHANGE flag ORed into the mask.
	
	// TODO: Add your control notification handler code here
	
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?