#ifndef _FEC_DLG_H_
#define _FEC_DLG_H_
#include "afxwin.h"

// CLS_FECDlg dialog

#define MAX_FEC_WINDOWS_COUNT	5

typedef struct
{
	int iFecSubID;
	bool blOpen;
} FecWindowPara;

typedef enum
{
	WINDOW_FISHEYE,
	WINDOW_360,
	WINDOW_180,
	WINDOW_PTZ1,
	WINDOW_PTZ2,
	WINDOW_MAX
} FEC_WINDOW;

class CLS_FECDlg : public CDialog
{
	DECLARE_DYNAMIC(CLS_FECDlg)

public:
	CLS_FECDlg(CWnd* pParent = NULL);   // standard constructor
	virtual ~CLS_FECDlg();

// Dialog Data
	enum { IDD = IDD_FEC_DIALOG };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()
public:
	virtual BOOL OnInitDialog();
	afx_msg void OnStnClickedStaticFisheyeVideo();
	afx_msg void OnStnClickedStatic360Video();
	afx_msg void OnStnClickedStatic180Video();
	afx_msg void OnStnClickedStaticPtzVideo1();
	afx_msg void OnStnClickedStaticPtzVideo2();
	afx_msg void OnClose();
private:
	int m_iPlayerID;
	CStatic m_stcFishEyeVideo;
	CStatic m_stc360Video;
	CStatic m_stc180Video;
	CStatic m_stcPtzVideo1;
	CStatic m_stcPtzVideo2;
	FecWindowPara	m_tFecWindowPara[MAX_FEC_WINDOWS_COUNT];
	int m_iSelectSubId;
	unsigned int m_uiSelectVideoRectID;
	CComboBox m_cboFecPlaceType;
	CEdit m_edtRadiusLeft;
	CEdit m_edtRadiusRight;
	CEdit m_edtRadiusTop;
	CEdit m_edtRadiusBottom;
	CEdit m_edtWideScanOffset;
	CEdit m_edtPtzPositionX;
	CEdit m_edtPtzPositionY;
	bool m_blStartTrack;
public:
	afx_msg void OnBnClickedButtonSetCyclePara();
	afx_msg void OnBnClickedButtonSetWidescanoffset();
	afx_msg void OnBnClickedButtonSetPtzPosition();
	afx_msg void OnStnDblclickStaticFisheyeVideo();
	afx_msg void OnStnDblclickStatic360Video();
	afx_msg void OnStnDblclickStatic180Video();
	afx_msg void OnStnDblclickStaticPtzVideo1();
	afx_msg void OnStnDblclickStaticPtzVideo2();

	void DrawRectangleByVideoRect(unsigned int _uiRectID);
	afx_msg void OnBnClickedButtonFecCaptureBmp();
	afx_msg void OnBnClickedButtonFecCaptureJpg();

	static void CLS_FECDlg::FishEyeCallBack(int _iID, int _iSubID, HDC _pvDC, unsigned int _uiWidth, unsigned int _uiHeight, void* _pvUsrData);
	afx_msg void OnBnClickedButtonFecDisenable();
	afx_msg void OnBnClickedButtonFecTrack();
};

#endif
