⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sampledlg.h

📁 TM8000硬盘录像机客户端编程文档和Demo源代码
💻 H
字号:
// SAMPLEDlg.h : header file
//

#if !defined(AFX_SAMPLEDLG_H__A54A45D2_D462_11D6_B953_00E04C6190FB__INCLUDED_)
#define AFX_SAMPLEDLG_H__A54A45D2_D462_11D6_B953_00E04C6190FB__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CSAMPLEDlg dialog
typedef struct _ALARM_LIST
{
	unsigned long nIpAddr;
	unsigned short nServPort;
}ALARM_LIST;

class CSAMPLEDlg : public CDialog
{
// Construction
public:
	static void __stdcall RealImageCallBack(HANDLE				ImageHandle,//图像实例句柄
							 unsigned long		NetAddr,
							 unsigned short		nServPort,//主机端口号	
							 unsigned char		nDataType,//数据类型
							 unsigned char		*pBuf,   //图像缓冲地址
							 unsigned long		dwSize,  //缓冲大小
							 unsigned char		nChannelNo, //主机通道号
							 unsigned char		nYear,   //年份 
							 unsigned char		nMonth,  //月份
							 unsigned char		nDay,    //日期
							 unsigned char		nHour,   //小时 
							 unsigned char		nMinute,  //分钟 
							 void				*lParam  //用户自定义数据
							 );
	static BOOL __stdcall RemoteRecDataCallBack(HANDLE	ImageHandle, void	*lParam); //是否需要远程录像文件
	static BOOL __stdcall Sock5TcpConnect(unsigned long hSock,
								 unsigned long NetAddr,
								 unsigned short nServPort);
	CSAMPLEDlg(CWnd* pParent = NULL);	// standard constructor

	MENU_FOCUS_NODE  m_MenuFocusNode ;
	HTREEITEM        hTreeRoot ;


    void AddNetNode(unsigned long nIpAddr,unsigned short nServPort,char *Buf);
    BOOL NetNodeLoginOK(unsigned long nIpAddr,unsigned short nServPort, char ch,int DVRHardWareType);
	BOOL NetSetRealImage(unsigned long nIpAddr,unsigned short nServPort, char* sPort,BOOL IsOpen=TRUE);
	BOOL AddNetNodeRecDate(unsigned long nIpAddr,unsigned short nServPort, char *sRecDate);
    BOOL AddNetNodeRecFile(unsigned long nIpAddr,unsigned short nServPort, char *sRecFile);
    void ServerAlarmPro(unsigned long nIpAddr,unsigned short nServPort, char *alarminfo);
	void CloseDVR(unsigned long nIpAddr,unsigned short nServPort);
	void DelItem(HTREEITEM hItem);
    void FindAllDiskDriver();
	void CheckPn(int No,BOOL isOpen);
	void RefreshIoCheck(int Para);
	CString str1;
	CString str2;
	CMenu  popMenu;
	int		m_RemotePlaySpeed;
	HANDLE PlayHandle;
	CBitmap m_12XCheck;
	CBitmap m_12XUnCheck;
	CBitmap m_14XCheck;
	CBitmap m_14XUnCheck;
	CBitmap m_18XCheck;
	CBitmap m_18XUnCheck;
	CBitmap m_1XCheck;
	CBitmap m_1XUnCheck;
	CBitmap m_2XCheck;
	CBitmap m_2XUnCheck;
	CBitmap m_4XCheck;
	CBitmap m_4XUnCheck;
	CBitmap m_8XCheck;
	CBitmap m_8XUnCheck;
	CBitmap m_PauseUnCheck;
	CBitmap m_PauseCheck;
	CBitmap m_PaceUnCheck;
	CBitmap m_PaceCheck;
	CBitmap m_FastUnCheck;
	CBitmap m_FastCheck;
    int hcount;
	int DVRHardWareType;


// Dialog Data
	//{{AFX_DATA(CSAMPLEDlg)
	enum { IDD = IDD_SAMPLE_DIALOG };
	CListBox	m_AlarmList;
	CEdit	m_Con_PFrameCount;
	CComboBox	m_SetIoMode;
	CComboBox	m_SetUser;
	CListBox	m_DiskInfo;
	CStatic	m_Video3;
	CIPAddressCtrl	m_cMulticastIp;
	CIPAddressCtrl	m_cIpServer;
	CStatic	m_Video2;
	CStatic	m_Video1;
	CIPAddressCtrl	m_cIP;
	CTreeCtrl	m_NetTree;
	UINT	m_imageno;
	BYTE	m_monitor;
	BYTE	m_date;
	BYTE	m_hour;
	BYTE	m_minute;
	BYTE	m_month;
	BYTE	m_year;
	BYTE	m_portno;
	BYTE	m_endhour;
	BYTE	m_endminute;
	CString	m_Passwd;
	short	m_ServPort;
	CString	m_IP;
	CString	m_UpdateFile;
	CString	m_state;
	CString	m_User;
	short	m_ServerPort;
	BOOL	m_UseTrans;
	short	m_LocalPort;
	short	m_MulticastPort;
	CString	m_ServerPasswd;
	CString	m_SetPassword;
	BOOL	m_P1;
	BOOL	m_P2;
	BOOL	m_P3;
	BOOL	m_P4;
	BOOL	m_P5;
	BOOL	m_P6;
	BOOL	m_P7;
	BOOL	m_P8;
	BOOL	m_P9;
	BOOL	m_P10;
	BOOL	m_P11;
	BOOL	m_P12;
	BOOL	m_P13;
	BOOL	m_P14;
	BOOL	m_P15;
	BOOL	m_P16;
	CString	m_PanProtocol;	
	CString	m_DomeBeta;
	int		m_PFrameCount;
	int		m_UpdatePort;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSAMPLEDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;
	CImageList m_TreeImage;
	static int __stdcall CheckUser(unsigned long nIpAddr,LPCTSTR UserName,LPCTSTR Passwd);
	// Generated message map functions
	//{{AFX_MSG(CSAMPLEDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnNetMsgPro(WPARAM wParam, LPARAM lParam);
	afx_msg void OnButton1();
	afx_msg void OnButton2();
	afx_msg void OnButton3();
	afx_msg void OnButton4();
	afx_msg void OnButton6();
	afx_msg void OnButton7();
	afx_msg void OnButton8();
	afx_msg void OnButton9();
	afx_msg void OnButton10();
	afx_msg void OnButton11();
	afx_msg void OnButton12();
	afx_msg void OnButton13();
	afx_msg void OnButton14();
	afx_msg void OnButton15();
	afx_msg void OnButton16();
	afx_msg void OnButton17();
	afx_msg void OnButton18();
	afx_msg void OnButton19();
	afx_msg void OnButton20();
	afx_msg void OnButton21();
	afx_msg void OnButton22();
	afx_msg void OnButton23();
	afx_msg void OnButton28();
	afx_msg void OnButton29();
	afx_msg void OnButton30();
	afx_msg void OnButton31();
	afx_msg void OnButton32();
	afx_msg void OnButton33();
	afx_msg void OnButton34();
	afx_msg void OnButton35();
	afx_msg void OnButton36();
	afx_msg void OnButton37();
	afx_msg void OnButton38();
	afx_msg void OnButton39();
	afx_msg void OnButton40();
	afx_msg void OnButton41();
	afx_msg void OnButton44();
	afx_msg void OnButton43();
	afx_msg void OnButton42();
	afx_msg void OnButton45();
	afx_msg void OnButton46();
	afx_msg void OnButton49();
	afx_msg void OnButton51();
	afx_msg void OnButton52();
	afx_msg void OnButton53();
	afx_msg void OnButton54();
	afx_msg void OnButton55();
	afx_msg void OnButton56();
	afx_msg void OnButton57();
	afx_msg void OnClose();
	afx_msg void OnMove(int x, int y);
	afx_msg void OnSelchangedTree1(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnRadioNone();
	afx_msg void OnRadioChannel1();
	afx_msg void OnRadioChannel2();
	afx_msg void OnRadioChannel3();
	afx_msg void OnReleasedcaptureSlider1(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnChkUsetransmit();
	afx_msg void OnBtnGetrecstate();
	afx_msg void OnBtnGetvideolost();
	afx_msg void OnBtnGetmovestate();
	afx_msg void OnBtnGetsensor();
	afx_msg void OnBtnGetdiskinfo();
	afx_msg void OnBtnRestart();
	afx_msg void OnBtnSetpassword();
	afx_msg void OnSelchangeComboSetiomode();
	afx_msg void OnCheckP1();
	afx_msg void OnCheckP2();
	afx_msg void OnCheckP3();
	afx_msg void OnCheckP4();
	afx_msg void OnCheckP5();
	afx_msg void OnCheckP6();
	afx_msg void OnCheckP7();
	afx_msg void OnCheckP8();
	afx_msg void OnCheckP9();
	afx_msg void OnCheckP10();
	afx_msg void OnCheckP11();
	afx_msg void OnCheckP12();
	afx_msg void OnCheckP13();
	afx_msg void OnCheckP14();
	afx_msg void OnCheckP15();
	afx_msg void OnCheckP16();
	afx_msg void OnBtnSetpan();
	afx_msg void OnBtnGetpan();
	afx_msg void OnBtnGetenvelop();
	afx_msg void OnGetheartbeatcondition();
 	afx_msg void OnDomebetacontrol();
	afx_msg void OnButton224();
	afx_msg void OnSlowHalfspeed();
	afx_msg void OnSlowQuarteredspeed();
	afx_msg void OnFast1x();
	afx_msg void OnFast2x();
	afx_msg void OnSlowHalfquarteredspeed();
	afx_msg void OnButton500();
	afx_msg void OnButton580();
	afx_msg void OnButton590();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnChangeEditSetpass();
	afx_msg void OnStaticState();
	afx_msg void OnChangeEdityear();
	afx_msg void OnChangeEditPanprotocol();
	afx_msg void OnPause();
	afx_msg void OnPace();
	afx_msg void OnFastforward();
	afx_msg void OnButton25();
	afx_msg void OnButton5();
	afx_msg void OnButtonPtzspeed();
	afx_msg void OnButtonPtzleft();
	afx_msg void OnButtonPtzright();
	afx_msg void OnButtonPtzcall();
	afx_msg void OnStaticDevtype();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	void CloseChannel(int nClientCh);
	void OpenChannel(int nClientCh);
	FILE *m_pBackFile;
	int m_nCurDVRType;
};

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

#endif // !defined(AFX_SAMPLEDLG_H__A54A45D2_D462_11D6_B953_00E04C6190FB__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -