⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 selectmulti.cpp

📁 包括语音识别和数字TTS 设置语音识别内容的列表
💻 CPP
字号:
// SelectMulti.cpp : implementation file
//

#include "stdafx.h"
#include "TelMateDemo.h"
#include "SelectMulti.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CSelectMulti dialog


CSelectMulti::CSelectMulti(CWnd* pParent /*=NULL*/)
	: CDialog(CSelectMulti::IDD, pParent)
{
	//{{AFX_DATA_INIT(CSelectMulti)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CSelectMulti::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CSelectMulti)
	DDX_Control(pDX, IDC_FILELIST, m_FileList);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CSelectMulti, CDialog)
	//{{AFX_MSG_MAP(CSelectMulti)
	ON_BN_CLICKED(IDC_ADD, OnAdd)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CSelectMulti message handlers

void CSelectMulti::OnOK() 
{
	m_FileList.GetWindowText(m_strFileList);
	if(m_strFileList.IsEmpty())
	{
		AfxMessageBox("文件不能为空");
		return ;
	}
	m_strFileList.Replace("\r\n",",");//用逗号分割多个文件传递给设备
	CDialog::OnOK();
}

void CSelectMulti::OnAdd() 
{
	static char szFilter[] = "Sound Files(*.pcm,*.wav)|*.pcm;*.wav|All Files (*.*)|*.*||";
 	CFileDialog dlgLoad(TRUE, NULL, NULL, OFN_HIDEREADONLY|OFN_FILEMUSTEXIST, (LPCTSTR)szFilter, NULL);
	if(dlgLoad.DoModal()!=IDOK)
		return;
	CString str=dlgLoad.GetPathName();
	if(str.GetLength() > 0)
	{
		CString strSrc;
		m_FileList.GetWindowText(strSrc);
		if(!strSrc.IsEmpty())
		{
			strSrc+="\r\n";
		}
		strSrc+=str;
		m_FileList.SetWindowText(strSrc);
	}
}

void CSelectMulti::PostNcDestroy() 
{
	CDialog::PostNcDestroy();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -