【VC开源代码栏目提醒】:文章导读:在新的一年中,各位网友都进入紧张的学习或是工作阶段。网学会员整理了VC开源代码-CongraduationDlg.cpp的相关内容供大家参考,祝大家在新的一年里工作和学习顺利!
// 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
}