#pragma once

#include "NZLiveDisplay.h"

// CDlgRTSPViewer ´ëÈ­ »óÀÚÀÔ´Ï´Ù.

class CDlgRTSPViewer : public CDialog
{
	DECLARE_DYNAMIC(CDlgRTSPViewer)

public:
	CDlgRTSPViewer(CWnd* pParent = NULL);   // Ç¥ÁØ »ý¼ºÀÚÀÔ´Ï´Ù.
	virtual ~CDlgRTSPViewer();

// ´ëÈ­ »óÀÚ µ¥ÀÌÅÍÀÔ´Ï´Ù.
	enum { IDD = IDD_RTSP_VIEWER };


public:
	BOOL Run( LPCTSTR addr, LPCTSTR port, LPCTSTR url, LPCTSTR id, LPCTSTR pw );
	BOOL m_running;

protected:
	CString m_addr;
	CString m_port;
	CString m_url;
	CString m_id;
	CString m_pw;
	CString m_rtsp_full_url;

	HANDLE m_display;
	ULONG_PTR m_gdiplusToken;

protected:
	virtual void DoDataExchange(CDataExchange* pDX) override;    // DDX/DDV Áö¿øÀÔ´Ï´Ù.
	virtual BOOL OnInitDialog() override;
	virtual void OnCancel() override;

	static BOOL CALLBACK OnCustomDraw(int nChannel, LPBITMAP pBitmap, LPRECT pSrcRect, LONG_PTR pUserParam);

	DECLARE_MESSAGE_MAP()
	afx_msg void OnDestroy();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnRButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnBnClickedBtnRun();
	afx_msg void OnBnClickedBtnStop();
};
