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

📄 dialoginput.cpp

📁 8数码自动演示程序C++,自己改写的
💻 CPP
字号:
// DialogInput.cpp : implementation file
//
#include "stdio.h"
#include "stdafx.h"
#include "Jiugong.h"
#include "DialogInput.h"
#include "stdlib.h" 
#include "time.h" 
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDialogInput dialog


CDialogInput::CDialogInput(CWnd* pParent /*=NULL*/)
	: CDialog(CDialogInput::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDialogInput)
	srand(time(NULL));
	int a,b,t;
	int i=0;
	int s[9];
	for(int d=0;d<9;d++)
	{
		s[d]=d;
	}
	while(i++<9)
	{
		do{
			a=rand()%9;
			b=rand()%9;

		}
		while(a==b);
		t=s[a];
		s[a]=s[b];
		s[b]=t;
	}
	m_int00 = s[0];
	m_int01 = s[1];
	m_int02 =s[2];
	m_int10 = s[3];
	m_int11 = s[4];
	m_int12 = s[5];
	m_int20 = s[6];
	m_int21 = s[7];
	m_int22 = s[8];
	//}}AFX_DATA_INIT
}


void CDialogInput::DoDataExchange(CDataExchange* pDX)
{
	

	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDialogInput)
	DDX_Text(pDX, IDC_EDIT1, m_int00);
	DDX_Text(pDX, IDC_EDIT2, m_int01);
	DDX_Text(pDX, IDC_EDIT3, m_int02);
	DDX_Text(pDX, IDC_EDIT4, m_int10);
	DDX_Text(pDX, IDC_EDIT5, m_int11);
	DDX_Text(pDX, IDC_EDIT6, m_int12);
	DDX_Text(pDX, IDC_EDIT7, m_int20);
	DDX_Text(pDX, IDC_EDIT8, m_int21);
	DDX_Text(pDX, IDC_EDIT9, m_int22);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDialogInput, CDialog)
	//{{AFX_MSG_MAP(CDialogInput)
		// NOTE: the ClassWizard will add message map macros here
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDialogInput message handlers

⌨️ 快捷键说明

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