#pragma once

enum WhatDlg
{
	MAINWINDOW,
	DRAWPOLYGONWIN,
	EZOOMWIN,
	EZOOMPNL
}; //主窗口 DrawPolygon窗口  ZoomVideo窗口；  ZoomPNL窗体

class CLS_DlgVedio : public CDialog
{
	DECLARE_DYNAMIC(CLS_DlgVedio)

public:
	CLS_DlgVedio(CWnd* pParent = NULL);
	virtual ~CLS_DlgVedio();

	enum { IDD = IDD_DLG_VIDEO };

	//播放库相关操作
	int		InitPlay();
	int		CreateFilePlayer(CString _strFile);
	int		DeletePlayer();
	int		Play();				//播放									
	int		Pause();			//暂停
	int		Step();				//步进
	int		Fast();				//快进									
	int		Slow();				//慢进

protected:
	virtual void DoDataExchange(CDataExchange* pDX);
	DECLARE_MESSAGE_MAP()

private:
	CString	m_cstrFileName;
	int		m_iPlayerId;		//播放句柄(ID)
	BOOL	m_blSync;			//是否同步回放
	int		m_iPlayDirect;		//播放方向，0正播，1倒播
	int		m_iSpeed;			//播放速度

public:
	int		m_iSelectID;
	bool	m_blIsPlay;

	void	SetPlaySync(BOOL _blSync){m_blSync = _blSync;};
	BOOL	GetPlaySync(){return m_blSync;};
	
	void	SetPlayDirect(int _iDirect){m_iPlayDirect = _iDirect;};
	BOOL	GetPlayDirect(){return m_iPlayDirect;};

	afx_msg void OnPaint();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	bool m_bIsCheckArea;
	
	WhatDlg m_iWhatDlg;		//标识父窗体
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
};
