?? nameindlg.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 + -