📄 herodlg.cpp
字号:
// HeroDlg.cpp : implementation file
//
#include "stdafx.h"
#include "SGame.h"
#include "HeroDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CHeroDlg dialog
CHeroDlg::CHeroDlg(CWnd* pParent /*=NULL*/)
: CDialog(CHeroDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CHeroDlg)
m_strScore1 = _T("");
m_strName1 = _T("");
m_strHeroLevel1 = _T("");
//}}AFX_DATA_INIT
}
void CHeroDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CHeroDlg)
DDX_Text(pDX, IDC_SCORE1, m_strScore1);
DDX_Text(pDX, IDC_NAME1, m_strName1);
DDX_Text(pDX, IDC_LEVEL1, m_strHeroLevel1);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CHeroDlg, CDialog)
//{{AFX_MSG_MAP(CHeroDlg)
ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
ON_BN_CLICKED(IDC_BUTTON1, OnClearData)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CHeroDlg message handlers
void CHeroDlg::OnButton2()
{
CHeroDlg::OnOK();
}
void CHeroDlg::OnClearData()
{
WritePrivateProfileString("HeroData","姓名",_T("匿名"),".\\myini.ini");
WritePrivateProfileString("HeroData","分数",_T("0"),".\\myini.ini");
WritePrivateProfileString("HeroData","等级",_T("1"),".\\myini.ini");
CHeroDlg::OnOK();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -