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

📄 nameinputdlg.cpp

📁 自制 9格拼图游戏 mfc程序 按钮拼图记录步数 用时 已完成数目 可重玩 退一步 瞎子拼图 记录游戏成绩
💻 CPP
字号:
// NameInputDlg.cpp : implementation file
//

#include "stdafx.h"
#include "box9.h"
#include "NameInputDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CNameInputDlg dialog


CNameInputDlg::CNameInputDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CNameInputDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CNameInputDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	//((CEdit*)GetDlgItem(IDC_NAMEINPUT))->SetLimitText(10);
	
}


void CNameInputDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CNameInputDlg)
	DDX_Control(pDX, IDC_NAMEINPUT, input);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CNameInputDlg, CDialog)
	//{{AFX_MSG_MAP(CNameInputDlg)
	ON_BN_CLICKED(IDC_BUTTONNAMEINPUT, OnButtonnameinput)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CNameInputDlg message handlers
#include"box9Dlg.h"
void CNameInputDlg::OnButtonnameinput() 
{
	
	CString m_NewJiLuName;
	GetDlgItemText(IDC_NAMEINPUT,m_NewJiLuName);
	if(m_NewJiLuName=="")
			m_NewJiLuName="匿名";
	((CBox9Dlg*)AfxGetMainWnd( ))->curdlg->m_NewJiLuName=m_NewJiLuName;
	EndDialog(IDC_BUTTONNAMEINPUT);
	
	
}



BOOL CNameInputDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	input.SetLimitText(10);
	this->SetWindowText(title);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

⌨️ 快捷键说明

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