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

📄 nameindlg.cpp

📁 小游戏sameball的vc源码
💻 CPP
字号:
// NameInDlg.cpp : implementation file
// 编码: Leezy
// 最后修改日期:5.1
//

#include "stdafx.h"
#include "sameball.h"
#include "NameInDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CNameInDlg dialog


CNameInDlg::CNameInDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CNameInDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CNameInDlg)
	m_sName = _T("");
	//}}AFX_DATA_INIT
}


void CNameInDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CNameInDlg)
	DDX_Text(pDX, IDC_EDIT1, m_sName);
	//}}AFX_DATA_MAP
}


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

/////////////////////////////////////////////////////////////////////////////
// CNameInDlg message handlers

void CNameInDlg::OnOK() 
{
	UpdateData(true);
	if(m_sName.GetLength()<2)
	{
		SetWindowText("对不起! 名字不应小于两个字符");
		return;
	}
	CDialog::OnOK();
}

void CNameInDlg::OnCancel() 
{
	
//	CDialog::OnCancel();
}

⌨️ 快捷键说明

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