// DlgSoundLoad.cpp : implementation file // #include "stdafx.h" #include "worldcreator.h" #include "DlgSoundLoad.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CDlgSoundLoad dialog CDlgSoundLoad::CDlgSoundLoad(CWnd* pParent /*=NULL*/) : CDialog(CDlgSoundLoad::IDD, pParent) { //{{AFX_DATA_INIT(CDlgSoundLoad) m_fMaxRange = 0.0f; m_fMinRange = 0.0f; //}}AFX_DATA_INIT m_bFilename=false; } void CDlgSoundLoad::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CDlgSoundLoad) DDX_Text(pDX, IDC_EDIT_SOUNDMAXRANGE, m_fMaxRange); DDX_Text(pDX, IDC_EDIT_SOUNDMINRANGE, m_fMinRange); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CDlgSoundLoad, CDialog) //{{AFX_MSG_MAP(CDlgSoundLoad) ON_BN_CLICKED(IDC_CHECK_SOUNDNAME, OnCheckSoundname) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CDlgSoundLoad message handlers void CDlgSoundLoad::OnCheckSoundname() { // TODO: Add your control notification handler code here UpdateData(); CWnd* forrename=GetDlgItem(IDC_CHECK_SOUNDNAME); CString strFilter = SOUNDFILE; CFileDialog filedia(TRUE,"",NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,strFilter,this); filedia.DoModal(); CString filename=filedia.GetFileName(); if(filename!="") { forrename->SetWindowText(filename.LockBuffer()); m_strSoundName=filename; } UpdateData(FALSE); } void CDlgSoundLoad::OnUpdateEditSoundrange() { UpdateData(); // TODO: If this is a RICHEDIT control, the control will not // send this notification unless you override the CDialog::OnInitDialog() // function to send the EM_SETEVENTMASK message to the control // with the ENM_UPDATE flag ORed into the lParam mask. // TODO: Add your control notification handler code here }