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

📄 gtmpegwnd.h

📁 一个完整的数字硬盘录像机系统软件
💻 H
字号:
// GtMpegWnd.h : header file
//

#if !defined(AFX_GTMPEGWND_H__976621C6_7429_4D10_8FCA_44CF4703AC45__INCLUDED_)
#define AFX_GTMPEGWND_H__976621C6_7429_4D10_8FCA_44CF4703AC45__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Resource.h"
#include "DigitClock.h"
#include "IconButton.h"
#include "PushButton.h"
#include "BKStatic.h"
#include "VideoPos.h"
#include "Caption.h"
#include "PlateButton.h"
#include "RudderButton.h"
#include "AlarmLamp.h"
#include "Chunnel.h"
#include "Audio.h"
#include "MultiListBox.h"
#include "BuildLogo.h"
#include "DataMsg.h"
class CImageObject;
class CListenSocket;
class CClientSocket;
class CCommandMsg;
class CGtMpegWnd : public CDialog
{
// Construction
public:
	CGtMpegWnd(CWnd* pParent = NULL);	// standard constructor
	~CGtMpegWnd();
//attrib
public:
	HANDLE             m_hCom;
	BOOL               m_bControl;
    CListenSocket*     m_pSocket;
	CPtrList           m_ClientList;
	BOOL               m_bAlarming;
	CImageObject*      m_pLogoObject;
	CRudderButton      m_wndRudderButton;
	CPlateButton       m_wndPlate;
	CAlarmLamp         m_wndAlarm[_CHANNEL_NUM];
	DCB                m_CommDCB;
	OVERLAPPED         m_OSWrite, m_OSRead ;
	CString            m_sLogoPath;
	CString            m_sBuildLogoPath;
	UINT               m_MaxVertSize;        //显示器宽度
	UINT               m_MaxHorzSize;        //显示器高度
	int                m_MaxPixelBits;       //显示器颜色数
    CSize              m_PalQSIFPicSize;
	CSize              m_PalSIFPicSize;
	CSize              m_DisplaySize;        //图象显示尺寸
	int                m_nPicNumX;
	int                m_nPicNumY;
	int                m_nChannel[_CHANNEL_NUM];
	int                m_nChoiceChannel[_CHANNEL_NUM];
	CStringArray       m_arFileName;
	CBrush		       m_BackgndBrush;
    CImageObject*      m_pVideoBK;
    CImageObject*      m_pMenuBK;
	BOOL               m_bStart; 
	CRect              m_rMpegRect;
	int                m_nRecords;
	int                m_nPlays;
	DWORD              m_dwMinDiskSpace;//
	DWORD              m_dwTimeslice;
	BOOL               m_bCompressCard;
	BOOL               m_bComWorking;
	CChunnelList       m_lstAlarmChunnel;
	CAudio             m_AlarmSound;
	CZoneList          m_lstRecZone;
	CZoneList          m_lstEnterDelayZone;
	CSecondaryList     m_lstAlarmSecondary;
	CClientSocket*     m_pClientSocket;
	CDataMsg           m_PixelMsg;
	int                m_nAlarmOffLine[8];
public:		// operations
	void               MoveMenu();
	void               SetMenuIcon();
	void               AdjustMpegWindow(int nChannel=-1);
	void               InitChoiceChannel();
    void               CloseSlot(DWORD  dwSlotNumber); 
	void               OpenSlot(UINT id);
	BOOL               OpenComm();
    void               CloseComm();
	BOOL               WriteCommCommand(BYTE strCommand[],int nLen=3);
	void               SendCommand(BYTE byCommand);
	void               SendCameraCommand(int nCommandWord);
    void               SetAlarm(BYTE byCommand[]);
	void               DisplayAll();
	void               StopDisplayAll();
	void               PauseDisplay();
	void               RestoreDisplay(int nFrame=-1);
	void               ForceStopRecord(CString sRoot);
	void               ChangShowText();
	void               DblkVideoPos(CWnd *CtlWnd);
	void               StartMpeg();
	void               FreeObject();
	void               OnComRxcharDected();
	BYTE *             ReadCommBlock(DWORD& dwLength);
	void	           InitAlarmChunnel();
	CChunnel*          GetChunnel(int nAddress); 
	void               SaveAlarmSet();
	int                GetZonesStates(int nAddress);
	int                GetSecondarysStates(int nAddress);
	void               SetZonesStates(int nAddress,int nZone,int nStates);
	void               SetSecondarysStates(int nAddress,int nSecondary,int nStates);
	void               StopTimerSecondary(int nChunnel,int nSecondary);
	void               StopChannelZone(int nChannel); 
	void               StopTimerRecord(int nChunnel,int nZone);
    void               PlayAlarmSound();   
    void               StopPlayAlarmSound();
	void               CheckZoneRecord();
	void               CheckSecondaryAlarm();
	void               ZoneAlarm(CZone *pZone);
	void               OpenZoneAlarm(CZone *pZone);
	void               CheckEnterDelayZone();
	void               WriteAlarmInfo(int nChunnel,int nZone,int nStates,COleDateTime Time); 
	void               ProcessPendingAccept();
	void               ProcessPendingRead(CClientSocket* pSocket);
	CCommandMsg*       ReadMsg(CClientSocket* pSocket);
	BOOL               SendMsg(CClientSocket* pSocket, CDataMsg* pMsg);
	void               CloseSocket();
	void               ArrangeFourMpegWnd(int arChannel[4]);
	void               InitZoneSet();
	void               TimerStopSecondary(int nChannel);
	void               AlarmReset(); 
	//void               
// Dialog Data
	//{{AFX_DATA(CGtMpegWnd)
	enum { IDD = IDD_GTMPEG_WND };
	CIconButton	m_cOpenMap;
	CStatic	m_cDiskSpaceTxt;
	CProgressCtrl	m_cDiskSpace;
	CIconButton	m_cAbout;
	CBuildLogo  m_wndBuildLogo;
	CVideoPos	m_cVideoPos0;
	CVideoPos	m_cVideoPos1;
	CVideoPos	m_cVideoPos2;
	CVideoPos	m_cVideoPos3;
	CVideoPos	m_cVideoPos4;
	CVideoPos	m_cVideoPos5;
	CVideoPos	m_cVideoPos6;
	CVideoPos	m_cVideoPos7;
	CVideoPos	m_cVideoPos8;
	CCaption	m_cChannelShow8;
	CCaption	m_cChannelShow7;
	CCaption	m_cChannelShow6;
	CCaption	m_cChannelShow5;
	CCaption	m_cChannelShow4;
	CCaption	m_cChannelShow3;
	CCaption	m_cChannelShow2;
	CCaption	m_cChannelShow1;
	CCaption	m_cChannelShow0;
	CMultiListBox	m_cMsgListBox;
	CIconButton	m_cSnap;
	CIconButton	m_cBackup;
	CIconButton	m_cSystemSet;
	CStatic	    m_cLogo;
	CIconButton	m_cPicPlane9;
	CIconButton	m_cPicPlane4;
	CIconButton	m_cPicPlane1;
	CBKStatic	m_cSetingPos;
	CBKStatic	m_cMpegPos;
	CIconButton	m_cStartVideo;
	CIconButton	m_cOK;
	CIconButton	m_cStop;
	CPushButton	m_cRaiseHead;
	CPushButton	m_cDeasilTurn;
	CIconButton	m_cVideoSeting;
	CIconButton	m_cRecord;
	CIconButton	m_cPlay;
	CDigitClock  m_cClock;
	//}}AFX_DATA
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CGtMpegWnd)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	virtual BOOL OnInitDialog();
	virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;
	// Generated message map functions
	//{{AFX_MSG(CGtMpegWnd)
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnClose();
	afx_msg void OnVideoSetting();
	virtual void OnOK(); 
	afx_msg void OnFreezeVideo();
	afx_msg void OnStartVideo();
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	afx_msg void OnPlay();
	afx_msg void OnRecord();
	afx_msg void OnStop();
	afx_msg void OnPicPlane1();
	afx_msg void OnPicPlane4();
	afx_msg void OnPicPlane9();
	afx_msg void OnSystemSet();
	afx_msg void OnBackup();
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnAboutbox();
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnSnap();
	afx_msg void OnDblclkMsgList();
	afx_msg void OnBuildUnit();
	afx_msg void OnOpenMap();
	//}}AFX_MSG
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg BOOL OnQueryNewPalette();
	afx_msg void OnPaletteChanged(CWnd* pFocusWnd);
	afx_msg void OnChoiceChannel(UINT);
	DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_GTMPEGWND_H__976621C6_7429_4D10_8FCA_44CF4703AC45__INCLUDED_)

⌨️ 快捷键说明

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