control/Plugin/Fast/FastView.h
2025-01-20 10:30:01 +08:00

48 lines
1021 B
C++

#pragma once
// CFastView
class CBaseCamera;
class CFastView : public CStatic
{
DECLARE_DYNAMIC(CFastView)
public:
CFastView();
virtual ~CFastView();
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
protected:
DECLARE_MESSAGE_MAP()
public:
void StartPlay(CString strFile);
void StopPlay();
void DrawPicture();
void CalculateImageRect();
CImage m_Image; //´´½¨Í¼Æ¬Àà
CRect m_ImageRect;
CBrush m_bkBrush;
public:
afx_msg void OnPaint();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
public:
void SetCameraInfo(int nIdx, ENUM_CAMERA_TYPE, ENUM_PLAY_TYPE, String strIp = "", int nPort = 0);
void DrawMat(cv::Mat& imageMat, int nOffset);
static UINT CameraThreadFunc(PVOID pv);
CBaseCamera *m_pCameraDlg;
int m_nCameraIdx;
ENUM_CAMERA_TYPE m_nCameraTyp;
ENUM_PLAY_TYPE m_nPlayTyp;
};