serialportdlg.h

来自「单片机ram下,pcm转换为wav文件,对想了解pcm和wav文件关系的人有用.」· C头文件 代码 · 共 79 行

H
79
字号
//{{AFX_INCLUDES()
#include "mscomm.h"
//}}AFX_INCLUDES
#if !defined(AFX_SERIALPORTDLG_H__4139B1CF_E4FA_497A_8D38_6278BE7C4B51__INCLUDED_)
#define AFX_SERIALPORTDLG_H__4139B1CF_E4FA_497A_8D38_6278BE7C4B51__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// SerialPortDlg.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CSerialPortDlg dialog

class CSerialPortDlg : public CDialog
{
// Construction
public:
	~CSerialPortDlg();
	CSerialPortDlg(CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CSerialPortDlg)
	enum { IDD = IDD_SerialPortDIALOG };
	CMSComm	m_ctrlComm;
	CString	m_strReceiveData;
	CString	m_strSendData;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSerialPortDlg)
	public:
	virtual int DoModal();
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	LONG n_ReceiveLength;//全局变量,暂存接收数据的长度
	int reversed;//串口发来的数据是MSB,reversed为1表示已经转成LSB(PCM码分两种,高位在前和在后)
	int person_index;//保存PCM文件时文件名中的人名序号
    int command_index;//保存PCM文件时文件名中的命令序号
	int person_index2;//保存wav文件时文件名中的人名序号
	int command_index2;//保存wav文件时文件名中的命令序号

	CString path;	    //程序路径
	CFile pcmFile;	//pcm文件
	CFile waveFile;	//wave文件
	char *rcvdArray ;//= new char[1];//存放串口接收的数据

	// Generated message map functions
	//{{AFX_MSG(CSerialPortDlg)
	afx_msg void OnComm();
	afx_msg void OnBUTTONOpenPort();
	afx_msg void OnButtonClear();
	afx_msg void OnButtonSavepcm();
	virtual BOOL OnInitDialog();
	afx_msg void OnButtonSavewav();
	afx_msg void OnButtonManualsend();
	afx_msg void OnButtonStart();
	afx_msg void OnButtonZanting();
	afx_msg void OnButtonContinue();
	afx_msg void OnButtonStop();
	afx_msg void OnButtonRestart();
	afx_msg void OnButtonReadfilebtn();
	DECLARE_EVENTSINK_MAP()
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SERIALPORTDLG_H__4139B1CF_E4FA_497A_8D38_6278BE7C4B51__INCLUDED_)

⌨️ 快捷键说明

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