⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mydlg.cpp

📁 运用vc++编写对话框登陆界面
💻 CPP
字号:
// MyDlg.cpp : implementation file
//

#include "stdafx.h"
#include "UU.h"
#include "MyDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// MyDlg dialog


MyDlg::MyDlg(CWnd* pParent /*=NULL*/)
	: CDialog(MyDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(MyDlg)
	m_a = 10;
	m_b = _T("0");
	m_c = 0;
	//}}AFX_DATA_INIT
}


void MyDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(MyDlg)
	DDX_Text(pDX, IDC_EDIT1, m_a);
	DDV_MinMaxInt(pDX, m_a, 0, 1000);
	DDX_Text(pDX, IDC_EDIT2, m_b);
	DDX_Text(pDX, IDC_EDIT3, m_c);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(MyDlg, CDialog)
	//{{AFX_MSG_MAP(MyDlg)
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
	ON_EN_UPDATE(IDC_EDIT1, fun)
	ON_EN_UPDATE(IDC_EDIT2, fun)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// MyDlg message handlers

void MyDlg::OnButton1() 
{
	UpdateData(1);	

//	m_a=100;
	m_c=m_a+atoi(m_b);
	UpdateData(0);	

}

void MyDlg::fun() 
{

	UpdateData(1);
	m_c=m_a+atoi(m_b);
	UpdateData(0);	
	
}

⌨️ 快捷键说明

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