CongraduationDlg.cpp
上传用户:hydatong
上传日期:2022-08-07
资源大小:219k
文件大小:2k
- // CongraduationDlg.cpp : implementation file
- //
- #include "stdafx.h"
- #include <mmsystem.h>
- #include "fighter.h"
- #include "CongraduationDlg.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CCongraduationDlg dialog
- CCongraduationDlg::CCongraduationDlg(CWnd* pParent /*=NULL*/)
- : CDialog(CCongraduationDlg::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CCongraduationDlg)
- m_strPercentage = _T("");
- m_strName = _T("");
- m_nBomb = 0;
- //}}AFX_DATA_INIT
- m_bSound = TRUE;
- }
- void CCongraduationDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CCongraduationDlg)
- DDX_Text(pDX, IDC_PERCENTAGE, m_strPercentage);
- DDX_Text(pDX, IDC_NAME, m_strName);
- DDX_Text(pDX, IDC_BOMB, m_nBomb);
- DDV_MinMaxInt(pDX, m_nBomb, 0, 100);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CCongraduationDlg, CDialog)
- //{{AFX_MSG_MAP(CCongraduationDlg)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CCongraduationDlg message handlers
- BOOL CCongraduationDlg::OnInitDialog()
- {
- CDialog::OnInitDialog();
-
- // TODO: Add extra initialization here
- if(m_bSound)PlaySound("win.wav", NULL, SND_FILENAME|SND_ASYNC|SND_NODEFAULT);
- GetDlgItem(IDC_NAME)->SetFocus();
- return FALSE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }