customdialog.cpp

来自「这是一个好玩的扫雷程序,用vc实现,其亮点是位图的操作.」· C++ 代码 · 共 62 行

CPP
62
字号
// CustomDialog.cpp : implementation file
//

#include "stdafx.h"
#include "WinMine.h"
#include "CustomDialog.h"

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

/////////////////////////////////////////////////////////////////////////////
// CCustomDialog dialog


CCustomDialog::CCustomDialog(CWnd* pParent /*=NULL*/)
	: CDialog(CCustomDialog::IDD, pParent)
{
	//{{AFX_DATA_INIT(CCustomDialog)
	m_nBomb = 0;
	m_nHeigth = 0;
	m_nWidth = 0;
	//}}AFX_DATA_INIT
}


void CCustomDialog::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CCustomDialog)
	DDX_Text(pDX, IDC_BOMB, m_nBomb);
	DDX_Text(pDX, IDC_HEIGTH, m_nHeigth);
	DDX_Text(pDX, IDC_WIDTH, m_nWidth);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CCustomDialog, CDialog)
	//{{AFX_MSG_MAP(CCustomDialog)
	ON_BN_CLICKED(IDC_SURE, OnSure)
	ON_BN_CLICKED(IDC_CANCLE, OnCancle)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCustomDialog message handlers

void CCustomDialog::OnSure() 
{
	// TODO: Add your control notification handler code here
	UpdateData(true);
	CDialog::OnOK();
}

void CCustomDialog::OnCancle() 
{
	// TODO: Add your control notification handler code here
	CDialog::OnCancel();
}

⌨️ 快捷键说明

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