HeroDlg.cpp
上传用户:clj987822
上传日期:2022-04-25
资源大小:13296k
文件大小:3k
- // HeroDlg.cpp : implementation file
- //
- #include "stdafx.h"
- #include "RussianGame.h"
- #include "HeroDlg.h"
- #include "RussianGameDlg.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_hero1 = _T("");
- m_hero2 = _T("");
- m_hero3 = _T("");
- m_hero4 = _T("");
- m_hero5 = _T("");
- m_heronum1 = 0;
- m_heronum2 = 0;
- m_heronum3 = 0;
- m_heronum4 = 0;
- m_heronum5 = 0;
-
- //}}AFX_DATA_INIT
- }
- void CHeroDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CHeroDlg)
- DDX_Control(pDX, IDOK, m_OK);
- DDX_Text(pDX, IDC_EDITHERO1, m_hero1);
- DDX_Text(pDX, IDC_EDITHERO2, m_hero2);
- DDX_Text(pDX, IDC_EDITHERO3, m_hero3);
- DDX_Text(pDX, IDC_EDITHERO4, m_hero4);
- DDX_Text(pDX, IDC_EDITHERO5, m_hero5);
- DDX_Text(pDX, IDC_EDITNUM1, m_heronum1);
- DDX_Text(pDX, IDC_EDITNUM2, m_heronum2);
- DDX_Text(pDX, IDC_EDITNUM3, m_heronum3);
- DDX_Text(pDX, IDC_EDITNUM4, m_heronum4);
- DDX_Text(pDX, IDC_EDITNUM5, m_heronum5);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CHeroDlg, CDialog)
- //{{AFX_MSG_MAP(CHeroDlg)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CHeroDlg message handlers
- void CHeroDlg::OnOK()
- {
- // TODO: Add extra validation here
-
- CDialog::OnOK();
- }
- BOOL CHeroDlg::OnInitDialog()
- {
- CDialog::OnInitDialog();
-
- // TODO: Add extra initialization here
- m_OK.SetIcon(IDI_ICONOK);
- m_OK.AddToolTip(_T("确定"));
- m_OK.SetBtnCursor(IDC_HAND);
- m_OK.SetActiveFgColor(RGB(0,0,255));
- m_hero1=AfxGetApp()->GetProfileString(_T("英雄榜"),_T("scorename1"),_T("无名英雄"));
- m_hero2=AfxGetApp()->GetProfileString(_T("英雄榜"),_T("scorename2"),_T("无名英雄"));
- m_hero3=AfxGetApp()->GetProfileString(_T("英雄榜"),_T("scorename3"),_T("无名英雄"));
- m_hero4=AfxGetApp()->GetProfileString(_T("英雄榜"),_T("scorename4"),_T("无名英雄"));
- m_hero5=AfxGetApp()->GetProfileString(_T("英雄榜"),_T("scorename5"),_T("无名英雄"));
- m_heronum1=AfxGetApp()->GetProfileInt(_T("英雄榜"),_T("scorenum1"),500);
- m_heronum2=AfxGetApp()->GetProfileInt(_T("英雄榜"),_T("scorenum2"),500);
- m_heronum3=AfxGetApp()->GetProfileInt(_T("英雄榜"),_T("scorenum3"),500);
- m_heronum4=AfxGetApp()->GetProfileInt(_T("英雄榜"),_T("scorenum4"),500);
- m_heronum5=AfxGetApp()->GetProfileInt(_T("英雄榜"),_T("scorenum5"),500);
- UpdateData(FALSE);
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }