📄 emlplayerdlg.h
字号:
// EMLplayerDlg.h : header file
//
#if !defined(AFX_EMLPLAYERDLG_H__AFE9B0CA_4838_4253_8400_14D91693FE2A__INCLUDED_)
#define AFX_EMLPLAYERDLG_H__AFE9B0CA_4838_4253_8400_14D91693FE2A__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include <Dshow.h>
#include <streams.h>
#include <atlbase.h> //
#include "uuids.h"
#include "CESeries.h"
/////////////////////////////////////////////////////////////////////////////
// CEMLplayerDlg dialog
#define SAMPLE_FREQ 100 // sample user input on an interval
class CEMLplayerDlg : public CDialog
{
// Construction
public:
CEMLplayerDlg(CWnd* pParent = NULL); // standard constructor
public:
CString SPathName;
CWnd *pWnd;
HWND m_Hwnd;
//IAudioControl* pAC;
//IVideoControl* pVC;
//ISeekingControl* pSeek;
#if 0
IGraphBuilder *pGB;
IMediaControl *pMC;
IMediaSeeking *pMS;
IMediaPosition *pMP;
IVideoWindow *pVW;
IBasicVideo *pBV;
IBasicAudio *pBA;
IMediaEvent *pME;
IQualProp *pQP;
IBaseFilter *pBF_OvM;
#endif
HRESULT GetInterfaces(void);
void CleanupInterfaces(void);
HRESULT PlayMedia(void);
void OnRun(void);
void OnStop1(void);
HRESULT AddWindowlessRendererToGraph(IGraphBuilder *pGB);
void ProcessEventLoop(void);
void DisplayECEvent(long lEventCode, long lParam1, long lParam2);
BOOL m_Start;
BOOL m_Complete;
BOOL m_Continue;
public:
UINT m_portNo; /*串口号*/
UINT m_baud; /*波特率*/
UINT m_parity; /*奇偶校验*/
UINT m_databits;/*数据位*/
UINT m_stopbits;/*停止位*/
bool m_ConnFlag;/*打开状态*/
int m_RecvLen;
CString m_strParity;
// Dialog Data
//{{AFX_DATA(CEMLplayerDlg)
enum { IDD = IDD_EMLPLAYER_DIALOG };
CString m_strRecv;
CString m_strSend;
CString m_strConFlag;
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CEMLplayerDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam);
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
private:
CCESeries m_ceSeries; //定义串口类
//串口读线程函数
BOOL OpenCOM(void);
void CloseCOM(void);
static DWORD WINAPI ReadThreadFunc(LPVOID lparam);
void CloseReadThread(void);
void ClosePlayThread(void);
private:
//读写线程句柄
HANDLE m_hReadThread;
HANDLE m_hPlayThread;
//读写线程ID标识
DWORD m_dwReadThreadID;
DWORD m_dwPlayThreadID;
public:
//读线程退出事件
HANDLE m_hReadCloseEvent;
// Generated message map functions
//{{AFX_MSG(CEMLplayerDlg)
virtual BOOL OnInitDialog();
afx_msg void OnOpen();
afx_msg void OnPlay();
afx_msg void OnClose();
afx_msg void OnStep();
afx_msg void OnStop();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft eMbedded Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_EMLPLAYERDLG_H__AFE9B0CA_4838_4253_8400_14D91693FE2A__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -