// LiveSampleDlg.h : header file
//
//{{AFX_INCLUDES()
#include "liveactivex.h"
//}}AFX_INCLUDES

#if !defined(AFX_LIVESAMPLEDLG_H__462ADAA4_F2C5_4023_B24A_1B28885D1A86__INCLUDED_)
#define AFX_LIVESAMPLEDLG_H__462ADAA4_F2C5_4023_B24A_1B28885D1A86__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CLiveSampleDlg dialog
#define TIMER_UPDATE_UI		(0)

enum PTZCapabilityQueryIndex {
    kPTZCapIndexEnable = 0,
    kPTZCapIndexBuiltin,
    kPTZCapIndexPane,
    kPTZCapIndexTilt,
    kPTZCapIndexZoom,
    kPTZCapIndexFocus,
    kPTZCapIndexPreset,
    kPTZCapIndexLilin,
    kPTZCapIndexAutoPan,
    kPTZCapIndexAreaZoom,
    kPTZCapIndexSpeedDomeOSDMen,
};

class CWebLiveViewerDlg;

class CPTZButton : public CButton
{
// Construction
public:
	CPTZButton();

// Attributes
public:    

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CPTZButton)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CPTZButton();

	// Generated message map functions
protected:
	//{{AFX_MSG(CPTZButton)
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
    
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

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

// Dialog Data
	//{{AFX_DATA(CLiveSampleDlg)
	enum { IDD = IDD_LIVESAMPLE_DIALOG };
	CComboBox	m_PresetName;
	CComboBox	m_CameraList;
	CLiveActiveX	m_LiveActievX;
	CString	m_Message;
	int		m_CameraView;
	CPTZButton	m_Home;
	CPTZButton	m_Down;
	CPTZButton	m_Up;
	CPTZButton	m_RightUp;
	CPTZButton	m_RightDown;
	CPTZButton	m_Right;
	CPTZButton	m_LeftUp;
	CPTZButton	m_LeftDown;
	CPTZButton	m_Left;
	CPTZButton	m_ZoomOut;
	CPTZButton	m_ZoomIN;
	CString	m_IPAddress;
	CString	m_PresetSet;
	int		m_DIIndex;
	int		m_DOIndex;
	CString	m_Password;
	CString	m_UserName;
	BOOL	m_bCameraName;
    BOOL    m_bCameraBitrate;
	BOOL	m_bDate;
	BOOL	m_bTime;
	BOOL	m_bBold;
	BOOL	m_bHasEdge;
	int		m_FontSize;
	int		m_Transparency;
	int		m_BackB;
	int		m_BackG;
	int		m_BackR;
	int		m_FontB;
	int		m_FontG;
	int		m_FontR;
	int		m_ActiveView;
	CString	m_SnapPath;
	int		m_Height;
	int		m_Width;
	CString	m_FontName;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CLiveSampleDlg)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL
public:
    void ButtonUp(int ctrlId);
    void ButtonDown(int ctrlId);

// Implementation
protected:
	HICON m_hIcon;
	int	  iframeCount;

	// Generated message map functions
	//{{AFX_MSG(CLiveSampleDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
    afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnTimer(UINT_PTR nIDEvent);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnButtonConnect();
	afx_msg void OnButtonCameralist();
	afx_msg void OnConnectCamera();
	afx_msg void OnButtonDicount();
	afx_msg void OnButtonDiname();
	afx_msg void OnButtonDistatus();
	afx_msg void OnButton1x1();
	afx_msg void OnButton2x2();
	afx_msg void OnButton3x3();
	afx_msg void OnButton4x4();
	afx_msg void OnButtonSnapshot();
	afx_msg void OnButtonDisconnect();
	afx_msg void OnButtonSetactive();
	afx_msg void OnButtonGetactive();
    afx_msg void OnButtonEnableAudioAndSetActive();
    afx_msg void OnButtonDisableAudioAndSetActive();
	afx_msg void OnButtonRawimage();
	afx_msg void OnButtonSetosd();
	afx_msg void OnButtonDocount();
	afx_msg void OnButtonDoname();
	afx_msg void OnButtonDostatus();
	afx_msg void OnButtonSetdo();
	afx_msg void OnButtonFullscreen();
	afx_msg void OnButtonPlay();
	afx_msg void OnButtonStop();
	afx_msg void OnButtonDrop();
	afx_msg void OnGetpreset();
	afx_msg void OnSetpreset();
	afx_msg void OnDeletepreset();
    afx_msg void OnSelchangeComboPreset();
	afx_msg void OnButtonRawimage2();
	afx_msg void OnOnEventLiveactivexctrl1(long iEventID, long iParameter);
	afx_msg void OnCreateComplete();
	afx_msg void OnButtonFocusnear();
	afx_msg void OnButtonFocusfar();
	afx_msg void OnButton1();
	afx_msg void OnHome();
	afx_msg void OnButtonGetCamerIndexFromView();
	afx_msg void OnDuplicateCamera();
	afx_msg void OnRemoveDuplicateCamera();
	virtual void OnOK();
	virtual void OnCancel();
	DECLARE_EVENTSINK_MAP()
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

private:
	void UpdatePTZUI();
	void UpdateCameraList();
};

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

#endif // !defined(AFX_LIVESAMPLEDLG_H__462ADAA4_F2C5_4023_B24A_1B28885D1A86__INCLUDED_)
