//{{AFX_INCLUDES()
#include "shockwaveflash.h"
//}}AFX_INCLUDES
#if !defined(AFX_NETVIEWXCTL_H__9DAC585E_8ABA_4683_8015_362945F6CF45__INCLUDED_)
#define AFX_NETVIEWXCTL_H__9DAC585E_8ABA_4683_8015_362945F6CF45__INCLUDED_

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

// NetViewXCtl.h : Declaration of the CNetViewXCtrl ActiveX Control class.
#include "DlgMailTest.h"

/////////////////////////////////////////////////////////////////////////////
// CNetViewXCtrl : See NetViewXCtl.cpp for implementation.
#ifdef L_IMPL_OBJECTSAFETY
#include <objsafe.h>
#endif // L_IMPL_OBJECTSAFETY

class CFullDisplayWnd;
//#define USER_TIMER_ALARM
typedef struct
{
	int chudev;
	int totaldevs;
	char devlist[26];
}DISK_ADMIN;

typedef struct
{
	int  curch;
	UINT timerid;
	unsigned char chinclude[16];
}CHANNWL_SWITCH;

typedef struct
{
	HANDLE hThread;
	UINT   timerid;
	int    bIsRecord;
	UINT   recordtime;
}DISK_OVERLAY;

typedef struct
{
	int year,month,day;
	int hours,minutes;
	int hourd,minuted;
}DISK_SEARCHINFO;

#define MAX_TRANSBUFF 100

//class CImageShow;

//#define SUBSHOW_RECT
class CServerControl;

class CNetViewXCtrl : public COleControl
{
	DECLARE_DYNCREATE(CNetViewXCtrl)

// Constructor
public:
	CNetViewXCtrl();
	LRESULT OnClientMessage(WPARAM wParam, LPARAM lParam);
	LRESULT OnSerial(WPARAM wParam,LPARAM lParam);
	void GetInfo(LPSTR url,LPSTR sername,LPSTR username,LPSTR password,WORD *port);
	void PublicInterStartView();
	BOOL	 m_bthreadstartview;
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CNetViewXCtrl)
	public:
	virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
	virtual void DoPropExchange(CPropExchange* pPX);
	virtual void OnResetState();
	virtual DWORD GetControlFlags();
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	//}}AFX_VIRTUAL

#ifdef L_IMPL_OBJECTSAFETY 
	BEGIN_INTERFACE_PART(ObjectSafety, IObjectSafety) 
		STDMETHOD(GetInterfaceSafetyOptions)(REFIID riid, DWORD __RPC_FAR *pdwSupportedOptions, DWORD __RPC_FAR *pdwEnabledOptions); 
		STDMETHOD(SetInterfaceSafetyOptions)(REFIID riid, DWORD dwOptionSetMask, DWORD dwEnabledOptions); 
	END_INTERFACE_PART(ObjectSafety) 

	DECLARE_INTERFACE_MAP(); 
#endif // L_IMPL_OBJECTSAFET

// Implementation
protected:
	//RECT m_FirstRect,m_DefaultRect;
	//COLORREF m_keycolor;
	//BOOL	 m_bIsMoutePTZCtrl;
	//int      m_setgangband;
	short    m_ptzpretype;
	LONG     m_talkhandle;
	int      m_audioon;
	BOOL	 m_bAudioOnInfact;
	DISK_OVERLAY	   m_diskover;
	DISK_ADMIN		   m_diskadmin;
	CHANNWL_SWITCH	   m_pChSwitch;
	UINT			   m_timerRelink;
	int				   m_nRelinkNum;
	int				   m_bVideoMaskEdit,m_bVideoMaskBtnDown;
	int				   m_maskmax_w,m_maskmax_h;
	int				   m_vmask_x,m_vmask_y,m_vmask_w,m_vmask_h;		/*	单区域屏蔽区域参数		*/
	VSNETVIDEOMASKAREA m_vmask[4];									/*	4区域屏蔽区域参数		*/
	int				   m_curmaskarea;								/*  当前编辑屏蔽区域区域号	*/
	//CHANNVIDEOMASK m_VideoMaskInfo;
#if defined(USER_TIMER_ALARM)
	UINT     m_timerSec,m_timerInter;
	int      m_timerCount;
#endif//USER_TIMER_ALARM
	int      m_postflag;
	int      m_curchannel;
	short    m_languagetype;
	int      m_curmouse_x,m_curmouse_y;
	int      m_bMotionTest;
	CHANNMOTION m_ChMotion;
	VSNETDVRMOTIONALARM m_DvrChMotion;
	//unsigned char m_bMotionArea[18][22];
	//LAUNET_MOTIONCFG m_pMotionCfg;
	int      m_wblock,m_hblock;
	BOOL	 m_bMotionEdit,m_bLinkOk;
	int      m_ImageWidth,m_ImageHeight;
	int      m_HCount,m_VCount;
	BOOL	 m_playstart;
	BOOL	 m_bSetVolume;
	UINT	 m_volume;

	BOOL	 m_bMotionBtnDown;
	BOOL     m_bIsnewTalk;
	CPoint	 m_mLtPoint,m_mRbPoint;
	~CNetViewXCtrl();

	DECLARE_OLECREATE_EX(CNetViewXCtrl)    // Class factory and guid
	DECLARE_OLETYPELIB(CNetViewXCtrl)      // GetTypeInfo
	DECLARE_PROPPAGEIDS(CNetViewXCtrl)     // Property page IDs
	DECLARE_OLECTLTYPE(CNetViewXCtrl)		// Type name and misc status

// Message maps
	//{{AFX_MSG(CNetViewXCtrl)
	afx_msg void OnClose();
	afx_msg void OnDestroy();
	afx_msg void OnPaint();
	afx_msg void OnMove(int x, int y);
	afx_msg void OnSizing(UINT fwSide, LPRECT pRect);
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
	//}}AFX_MSG
	afx_msg LRESULT OnJPEGEventMsg(WPARAM wParam,LPARAM lParam);
	afx_msg LRESULT OnJPEGDataMsg(WPARAM wParam,LPARAM lParam);
	afx_msg LRESULT OnWMUseableWifi(WPARAM wParam,LPARAM lParam);
	afx_msg LRESULT OnWMInvalidate(WPARAM wParam,LPARAM lParam);
	DECLARE_MESSAGE_MAP()
// Dispatch maps
	//{{AFX_DISPATCH(CNetViewXCtrl)
	CString m_url;
	afx_msg void OnUrlChanged();
	short m_channel;
	afx_msg void OnChannelChanged();
	CString m_username;
	afx_msg void OnUsernameChanged();
	CString m_password;
	afx_msg void OnPasswordChanged();
	CString m_servername;
	afx_msg void OnServernameChanged();
	BOOL m_viewQCIF;
	afx_msg void OnViewQCIFChanged();
	short m_trantype;
	afx_msg void OnTrantypeChanged();
	short m_buffernum;
	afx_msg void OnBuffernumChanged();
	long m_wServerPort;
	afx_msg void OnWServerPortChanged();
	BOOL m_bUseOverlay;
	afx_msg void OnBUseOverlayChanged();
	short m_delaytime;
	afx_msg void OnDelaytimeChanged();
	short m_streamtype;
	afx_msg void OnStreamtypeChanged();
	afx_msg void FullScreen();
	afx_msg BOOL StartView();
	afx_msg BOOL StopView();
	afx_msg short StartRecord(LPCTSTR filename);
	afx_msg void StopRecord();
	afx_msg BOOL CaptureBmp(LPCTSTR filename);
	afx_msg long StartTalk();
	afx_msg long StopTalk();
	afx_msg void SoundOn();
	afx_msg void SoundOff();
	afx_msg short ImageWidth();
	afx_msg short ImageHeight();
	afx_msg void PostProMethon(long postmethon);
	afx_msg short PTZCtrl(short type, long param);
	afx_msg long ViParamAdjust(short Brightness, short Contrast, short Staturation, short Hue);
	afx_msg void MotionTest(BOOL bTest);
	afx_msg void MotionEdit(BOOL bStart);
	afx_msg void SetMotionArea();
	afx_msg void SetMotionVal(short nVal);
	afx_msg void MotionAreaSetAll();
	afx_msg void MotionAreaClear();
	afx_msg BSTR GetSaveFileName();
	afx_msg void SetLanguage(short languagetype);
	afx_msg long StartConnect();
	afx_msg long StartDisplay();
	afx_msg void StopDisplay();
	afx_msg short GetCurStatus();
	afx_msg void ClearAlarm();
	afx_msg void SetPTZAddr(short addr);
	afx_msg void PTZExDevCtrl(short devno, short isOn);
	afx_msg void CtrolAlarmOut(short alarmno, short bIsopen);
	afx_msg void ChannelSwitch(short bStart, short interval);
	afx_msg void ChannelSel(short channel);
	afx_msg void SetSwitchChannel(short channel, short bInswitch);
	afx_msg void SearchFile(long year, long month, long day, long s_hour, long s_minute, long e_hour, long e_minute);
	afx_msg void VideoMaskEnable(short bEnable);
	afx_msg void VideoMaskEdit(short bEnable);
	afx_msg void SetTalkChannel();
	afx_msg void SwitchGangChannel(short ch);
	afx_msg BOOL Transparent(long pData, short size);
	afx_msg void SetGangBandrate(long baud);
	afx_msg void StartSerial(short port, long band, short checkbit, short databit, short stopbit, short flowctrl);
	afx_msg void StopSerial();
	afx_msg short StartServerRecord();
	afx_msg short StopServerRecord();
	afx_msg BOOL TransparentSend();
	afx_msg BOOL CaptureJpeg(LPCTSTR filename);
	afx_msg BOOL CaptureJpegStart();
	afx_msg BOOL CaptureJpegStop();
	afx_msg BOOL SetWaitTime(short waittime, short retrynum);
	afx_msg BOOL SyncTime(long year, long month, long day, long hour, long minute, long second);
	afx_msg BOOL TransparentSendEx(short channel);
	afx_msg short ReadRecordFile();
	afx_msg BSTR StartClientRecord();
	afx_msg short StopClientRecord();
	afx_msg void SetRecordType(short type);
	afx_msg BOOL SendBankInfo(LPCTSTR personnum, LPCTSTR boxnum, short recvnum, short sendnum);
	afx_msg void SetRecordPackTime(short packtime);
	afx_msg BOOL SetAudioVolume(long volume);
	afx_msg BOOL SetCurMaskArea(short area);
    afx_msg BOOL FlipVideo();
	afx_msg BOOL CleanMaskArea(short area);
	afx_msg BOOL ServerCapturePic();
    afx_msg BOOL TranCtrl(long ctrlcode);
	afx_msg short GetChannelOsd();
	afx_msg short SetChannelOsd(short timeindex, short timex, short timey, short bitrateindex, short bitratex, short bitratey, LPCTSTR title1str, short title1x, short title1y, LPCTSTR title2str, short title2x, short title2y);
	afx_msg short GetChannelEncParam();
	afx_msg short SetChannelEncParam(short encodetype, short bitratetype, short maxbitrate, short maxqueue, short minqueue, short framerate, short streamtype, short iinterval);
	afx_msg short GetViParam();
	afx_msg short SetViParam(short bri, short con, short sat, short hue);
	afx_msg short SaveParam();
	afx_msg short RestartDevice();
	afx_msg BSTR GetUseableWifi();
    afx_msg BOOL  ChooseVideoInput(short input);
	afx_msg BOOL PtzLock(BOOL bLock, long nPriority, long lockTime);
	afx_msg BOOL SetDeviceName(LPCTSTR lpName);
	afx_msg short PTZCtrlPriority(short type, long param, short npriority);
	afx_msg BOOL PISNow(BOOL bStartPIS);
	afx_msg BOOL PISNexttime(BOOL bStartPIS);
	afx_msg void FullScreenEx();
	afx_msg long StartDDNSConnect();
	afx_msg BOOL StartDDNSView();
	afx_msg BOOL IsFullScreen();
	afx_msg void SendSerialString(LPCSTR pBuff);
	afx_msg void MailTest(short testnum);
	afx_msg long GetConnectIPNumber();
	afx_msg BOOL FlipVideoH();
	afx_msg long SharpeVideo(long iSharpeVideo);
	//}}AFX_DISPATCH
	DECLARE_DISPATCH_MAP()
public:

// Event maps
	//{{AFX_EVENT(CNetViewXCtrl)
	void FireUserChange(long usernum)
		{FireEvent(eventidUserChange,EVENT_PARAM(VTS_I4), usernum);}
	void FireTalkStatus(long status)
		{FireEvent(eventidTalkStatus,EVENT_PARAM(VTS_I4), status);}
	void FireStringMsg()
		{FireEvent(eventidStringMsg,EVENT_PARAM(VTS_NONE));}
	void FireAlarm(long type, long channel)
		{FireEvent(eventidAlarm,EVENT_PARAM(VTS_I4  VTS_I4), type, channel);}
	void FireClickSel(LPCTSTR url, long channel)
		{FireEvent(eventidClickSel,EVENT_PARAM(VTS_BSTR  VTS_I4), url, channel);}
	void FireSearchRet(LPCTSTR url, LPCTSTR date, LPCTSTR time, long length, LPCTSTR filename)
		{FireEvent(eventidSearchRet,EVENT_PARAM(VTS_BSTR  VTS_BSTR  VTS_BSTR  VTS_I4  VTS_BSTR), url, date, time, length, filename);}
	void FireExOutPutStatus(long status)
		{FireEvent(eventidExOutPutStatus,EVENT_PARAM(VTS_I4), status);}
	void FireTempNotify(LPCTSTR temp)
		{FireEvent(eventidTempNotify,EVENT_PARAM(VTS_BSTR), temp);}
	void FireHumNotify(LPCTSTR hum)
		{FireEvent(eventidHumNotify,EVENT_PARAM(VTS_BSTR), hum);}
	void FireServerRecordStatus(long status)
		{FireEvent(eventidServerRecordStatus,EVENT_PARAM(VTS_I4), status);}
	void FireJPEGEvent(long status)
		{FireEvent(eventidJPEGEvent,EVENT_PARAM(VTS_I4), status);}
	void FireLinkStatus(long status)
		{FireEvent(eventidLinkStatus,EVENT_PARAM(VTS_I4), status);}
	void FireRecordFileNotify(short channel, LPCTSTR filetime, LPCTSTR filename, long filesize)
		{FireEvent(eventidRecordFileNotify,EVENT_PARAM(VTS_I2  VTS_BSTR  VTS_BSTR  VTS_I4), channel, filetime, filename, filesize);}
	void FireClientRecordStatus(long status)
		{FireEvent(eventidClientRecordStatus,EVENT_PARAM(VTS_I4), status);}
	void FireJPEGData(BSTR FAR* pbuff, long size)
		{FireEvent(eventidJPEGData,EVENT_PARAM(VTS_PBSTR  VTS_I4), pbuff, size);}
	void FireLButtonDblClk(LPCTSTR url, long channel)
		{FireEvent(eventidLButtonDblClk,EVENT_PARAM(VTS_BSTR  VTS_I4), url, channel);}
	void FireVideoMaskParam(long bmask, short areas)
		{FireEvent(eventidVideoMaskParam,EVENT_PARAM(VTS_I4  VTS_I2), bmask, areas);}
	void FireDiskStatus(long disk1status, long disk2status)
		{FireEvent(eventidDiskStatus,EVENT_PARAM(VTS_I4  VTS_I4), disk1status, disk2status);}
	void FireSwitchScreenName(LPCTSTR name1, LPCTSTR name2, LPCTSTR name3, LPCTSTR name4, LPCTSTR name5, LPCTSTR name6, LPCTSTR name7, LPCTSTR name8, LPCTSTR name9)
		{FireEvent(eventidSwitchScreenName,EVENT_PARAM(VTS_BSTR  VTS_BSTR  VTS_BSTR  VTS_BSTR  VTS_BSTR  VTS_BSTR  VTS_BSTR  VTS_BSTR  VTS_BSTR), name1, name2, name3, name4, name5, name6, name7, name8, name9);}
	void FireChannelOsd(short timeindex, short timex, short timey, short bitrateindex, short bitratex, short bitratey, LPCTSTR title1str, short title1x, short title1y, LPCTSTR title2str, short title2x, short title2y)
		{FireEvent(eventidChannelOsd,EVENT_PARAM(VTS_I2  VTS_I2  VTS_I2  VTS_I2  VTS_I2  VTS_I2  VTS_BSTR  VTS_I2  VTS_I2  VTS_BSTR  VTS_I2  VTS_I2), timeindex, timex, timey, bitrateindex, bitratex, bitratey, title1str, title1x, title1y, title2str, title2x, title2y);}
	void FireChannelEncParam(short encodetype, short bitratetype, short maxbitrate, short maxqueue, short minqueue, short framerate, short streamtype, short iinterval)
		{FireEvent(eventidChannelEncParam,EVENT_PARAM(VTS_I2  VTS_I2  VTS_I2  VTS_I2  VTS_I2  VTS_I2  VTS_I2  VTS_I2), encodetype, bitratetype, maxbitrate, maxqueue, minqueue, framerate, streamtype, iinterval);}
	void FireViParam(short bri, short con, short sat, short hue)
		{FireEvent(eventidViParam,EVENT_PARAM(VTS_I2  VTS_I2  VTS_I2  VTS_I2), bri, con, sat, hue);}
	void FireUseableWifi(LPCTSTR m_strResult)
		{FireEvent(eventidUseableWifi,EVENT_PARAM(VTS_BSTR), m_strResult);}
	void FireSerialReceiveString(LPCTSTR strReceive)
		{FireEvent(eventidSerialReceiveString,EVENT_PARAM(VTS_BSTR), strReceive);}
	void FireRButtonDown(LPCTSTR url, long channel)
		{FireEvent(eventidRButtonDown,EVENT_PARAM(VTS_BSTR  VTS_I4), url, channel);}
	void FireRButtonUp(LPCTSTR url, long channel)
		{FireEvent(eventidRButtonUp,EVENT_PARAM(VTS_BSTR  VTS_I4), url, channel);}
	void FireAudioState(BOOL bAudioOpen)
		{FireEvent(eventidAudioState,EVENT_PARAM(VTS_BOOL), bAudioOpen);}
	void FireConnectIPAddr(LPCTSTR ip)
		{FireEvent(eventidConnectIPAddr,EVENT_PARAM(VTS_BSTR), ip);}
	//}}AFX_EVENT
	DECLARE_EVENT_MAP()

// Dispatch and event IDs
public:
	LONG m_hChHandle;
	LONG m_jpegHandle;
	RECT     m_OptRect;
	COLORREF m_Optcolor;
	char     m_OptString[100];
	CServerControl *m_control;
	//CImageShow *m_pImageShow;
	int           m_bOnServerRecv;
	unsigned char m_transbuff[MAX_TRANSBUFF];
	int           m_translen;
	BOOL          m_jpegerror;
	char          m_jpegfilename[MAX_PATH];
	int           m_recordtype;   //0:asf 1:mp4 2:264
	
	long          m_displayhandle;
	int           m_displaywidth,m_displayheight;

	VSNETPLAY_FILE_DATA m_filedata;
	int                 m_bdisplay;
	CShockwaveFlash    *m_flash;
    int                 m_recordpacktime;  
	CString             m_szPath;
    CString             m_szFileName;
    CString             m_szExtension;
	LONG                m_hMessageParam;
	char                UseableWifiList[100];
	int			        m_PISTag;//-1不需使用防裂屏功能，0关闭，1启用
	
public:
	int RelinkTalk();
	HANDLE m_hTalkRelinkThread;
	BOOL m_bTalkRelinkThread;
	BOOL GetSwitchScreenName();
	CString m_szSaveFileName;
	CString	m_szLastSearchDir;
	CString	m_sUseableWifiList;
	BOOL GetRecordPackTime();
	BOOL GetDiskState();
	BOOL m_bFlipVideo;
	BOOL m_bFlipVideoH;
	void GetVideoMaskParam();
	void UnFullScreen();
	enum {
	//{{AFX_DISP_ID(CNetViewXCtrl)
	dispidUrl = 1L,
	dispidChannel = 2L,
	dispidUsername = 3L,
	dispidPassword = 4L,
	dispidServername = 5L,
	dispidViewQCIF = 6L,
	dispidTrantype = 7L,
	dispidBuffernum = 8L,
	dispidWServerPort = 9L,
	dispidBUseOverlay = 10L,
	dispidDelaytime = 11L,
	dispidStreamtype = 12L,
	dispidFullScreen = 13L,
	dispidStartView = 14L,
	dispidStopView = 15L,
	dispidStartRecord = 16L,
	dispidStopRecord = 17L,
	dispidCaptureBmp = 18L,
	dispidStartTalk = 19L,
	dispidStopTalk = 20L,
	dispidSoundOn = 21L,
	dispidSoundOff = 22L,
	dispidImageWidth = 23L,
	dispidImageHeight = 24L,
	dispidPostProMethon = 25L,
	dispidPTZCtrl = 26L,
	dispidViParamAdjust = 27L,
	dispidMotionTest = 28L,
	dispidMotionEdit = 29L,
	dispidSetMotionArea = 30L,
	dispidSetMotionVal = 31L,
	dispidMotionAreaSetAll = 32L,
	dispidMotionAreaClear = 33L,
	dispidGetSaveFileName = 34L,
	dispidSetLanguage = 35L,
	dispidStartConnect = 36L,
	dispidStartDisplay = 37L,
	dispidStopDisplay = 38L,
	dispidGetCurStatus = 39L,
	dispidClearAlarm = 40L,
	dispidSetPTZAddr = 41L,
	dispidPTZExDevCtrl = 42L,
	dispidCtrolAlarmOut = 43L,
	dispidChannelSwitch = 44L,
	dispidChannelSel = 45L,
	dispidSetSwitchChannel = 46L,
	dispidSearchFile = 47L,
	dispidVideoMaskEnable = 48L,
	dispidVideoMaskEdit = 49L,
	dispidSetTalkChannel = 50L,
	dispidSwitchGangChannel = 51L,
	dispidTransparent = 52L,
	dispidSetGangBandrate = 53L,
	dispidStartSerial = 54L,
	dispidStopSerial = 55L,
	dispidStartServerRecord = 56L,
	dispidStopServerRecord = 57L,
	dispidTransparentSend = 58L,
	dispidCaptureJpeg = 59L,
	dispidCaptureJpegStart = 60L,
	dispidCaptureJpegStop = 61L,
	dispidSetWaitTime = 62L,
	dispidSyncTime = 63L,
	dispidTransparentSendEx = 64L,
	dispidReadRecordFile = 65L,
	dispidStartClientRecord = 66L,
	dispidStopClientRecord = 67L,
	dispidSetRecordType = 68L,
	dispidSendBankInfo = 69L,
	dispidSetRecordPackTime = 70L,
	dispidSetAudioVolume = 71L,
	dispidSetCurMaskArea = 72L,
	dispidFlipVideo = 73L,
	dispidCleanMaskArea = 74L,
	dispidServerCapturePic = 75L,
	dispidTranCtrl = 76L,
	dispidGetChannelOsd = 77L,
	dispidSetChannelOsd = 78L,
	dispidGetChannelEncParam = 79L,
	dispidSetChannelEncParam = 80L,
	dispidGetViParam = 81L,
	dispidSetViParam = 82L,
	dispidSaveParam = 83L,
	dispidRestartDevice = 84L,
	dispidGetUseableWifi = 85L,
	dispidChooseVideoInput = 86L,
	dispidPtzLock = 87L,
	dispidSetDeviceName = 88L,
	dispidPTZCtrlPriority = 89L,
	dispidPISNow = 90L,
	dispidPISLater = 91L,
	dispidFullScreenEx = 92L,
	dispidStartDDNSConnect = 93L,
	dispidStartDDNSView = 94L,
	dispidIsFullScreen = 95L,
	dispidSendSerialString = 96L,
	dispidMailTest = 97L,
	dispidGetConnectIPNumber = 98L,
	dispidFlipVideoH = 99L,
	dispidSharpeVideo = 100L,
	eventidUserChange = 1L,
	eventidTalkStatus = 2L,
	eventidStringMsg = 3L,
	eventidAlarm = 4L,
	eventidClickSel = 5L,
	eventidSearchRet = 6L,
	eventidExOutPutStatus = 7L,
	eventidTempNotify = 8L,
	eventidHumNotify = 9L,
	eventidServerRecordStatus = 10L,
	eventidJPEGEvent = 11L,
	eventidLinkStatus = 12L,
	eventidRecordFileNotify = 13L,
	eventidClientRecordStatus = 14L,
	eventidJPEGData = 15L,
	eventidLButtonDblClk = 16L,
	eventidVideoMaskParam = 17L,
	eventidDiskStatus = 18L,
	eventidSwitchScreenName = 19L,
	eventidChannelOsd = 20L,
	eventidChannelEncParam = 21L,
	eventidViParam = 22L,
	eventidUseableWifi = 23L,
	eventidSerialReceiveString = 24L,
	eventidRButtonDown = 25L,
	eventidRButtonUp = 26L,
	eventidAudioState = 27L,
	eventidConnectIPAddr = 28L,
	//}}AFX_DISP_ID
	};
private:
	void TranCodeToString(int wParam,int code,char *lpstr);
	void LoadTatalDisk();
	int  GetCanUseDisk();
	int  InterRecord(BOOL bIsStart,BOOL bUserControl = FALSE,LPCTSTR filename = NULL);
	BOOL InterStartView(BOOL bDDNS = FALSE);
	void InterStopView();
	void findfile_indev(char devn,DISK_SEARCHINFO *pInfo);
	void findfile_indir(char *dir,char *pDate,DISK_SEARCHINFO *pInfo);
	void ThreadInterStartView();
	//void SetGangBandrate(int baud);
private:
	CHANNOSD m_channosd;
	CHANNELPARAM m_channparam;
	CHANNELPARAMEX m_channparamex;
	CHANNVIPARAM m_viparam;
	CFullDisplayWnd	*m_pFullScreenWnd;
    CDlgMailTest *m_dlgMail;
};

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

#endif // !defined(AFX_NETVIEWXCTL_H__9DAC585E_8ABA_4683_8015_362945F6CF45__INCLUDED)
