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

📄 newwindow.cpp

📁 esDice.ico This an icon file, which is used as the application s icon. This icon is included by
💻 CPP
字号:
// NewWindow.cpp : implementation file
//

#include "stdafx.h"
#include "Dice.h"
#include "NewWindow.h"
#include <string>
using namespace std;

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

/////////////////////////////////////////////////////////////////////////////
// NewWindow dialog


NewWindow::NewWindow(CWnd* pParent /*=NULL*/)
	: CDialog(NewWindow::IDD, pParent)
{
	//{{AFX_DATA_INIT(NewWindow)
	m_dicenum = 0;
	m_expnum = 0;
	//}}AFX_DATA_INIT
}


void NewWindow::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(NewWindow)
	DDX_Control(pDX, IDC_EDIT1, m_text1);
	DDX_Control(pDX, IDC_EDIT2, m_text2);
	DDX_Text(pDX, IDC_EDIT1, m_dicenum);
	DDX_Text(pDX, IDC_EDIT2, m_expnum);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(NewWindow, CDialog)
	//{{AFX_MSG_MAP(NewWindow)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// NewWindow message handlers

void NewWindow::OnOK() 
{
	int n1,n2;
    CString str1,str2;
	m_text1.GetWindowText(str1);
    m_text2.GetWindowText(str2);
	n1 = atoi(str1);
	n2 = atoi(str2);
	if(n1>0&&n2>0)
	   CDialog::OnOK();
	else
	   MessageBox("输入数据有误!请重新输入");
}

⌨️ 快捷键说明

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