📄 cpecontrol.h
字号:
// CPEControl.h: interface for the CCPEControl class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_CPECONTROL_H__F06D2E82_9E5D_11D2_A4BA_004033328274__INCLUDED_)
#define AFX_CPECONTROL_H__F06D2E82_9E5D_11D2_A4BA_004033328274__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
typedef struct{
POINT winOrgPoint;
BOOL bRealGrab;
}ThreadRecord;
#define YUV9_PLANAR 0xC3
#define RGB24_PACKED 0x00
#define min(a,b) (((a) < (b)) ? (a) : (b))
#define max(a,b) (((a) > (b)) ? (a) : (b))
#define TIMERID 1997
#define BMP640X 505
#define BMP480Y 360
#define BMP800X 644
#define BMP600Y 458
#define BMPWIDTH 63
#define BMPHEIGHT 39
#define SCROLLNUM 6
#define SOURCE_NTSC 0
#define SOURCE_PAL 1
#define IDM_100_SCALE 910
#define IDM_10_SCALE 901
UINT VGAImageShowThreadProc(LPVOID pParam);
class CCPEControl
{
private:
void ModifyParamRestore();
void SetGrabPrepare();
void GrabParamInit();
void LoadProfile(int* pParam);
void WriteProfile();
//int SizeSet(HWND hWnd,int cxClient,int cyClient);
int cpeParam[6];
WORD wCurrent_pixel_Format;// = RGB24_PACKED;
int wMemSize; // Memory size allocated for CA-CPE-1000 //!!!???
WORD wIRQ;
int wTotal_Frames ; // Total frames
WORD wScreenWidth;// = 640; // Width of screen
WORD wScreenHeight;// = 480; // Height of screen
WORD wScaleWidth;//= 640;
WORD wScaleHeight;// = 480;
int videoX, videoY;
WORD wCurrent_Frame;// = 1; // Current frame
BYTE bNonGrab;// = TRUE;
WORD wImgWidth;// = 512; // Width of grab image
WORD wImgHeight;// = 512; // Height of grab image
WORD wVGAWidth;// = 640;
WORD wVGAHeight;// = 480;
BOOL bGrabMark;
BYTE *lpMark ; // Mark for occupied frame
//LPBYTE lpDib ; // Pointer of image data
HGLOBAL hglb;
HDC hdc;
HWND hwnd;
POINT winOrgPoint;
BOOL bReturn;
TEXTMETRIC tm;
short cxClient, cyClient, cyChar, cxChar;
WORD wCurrent_source_Type;// = SOURCE_NTSC;
WORD wGrabWinX1;// = 0; // Coordinates of grab window
WORD wGrabWinY1;// = 0;
WORD wGrabWinX2;// = 639;
WORD wGrabWinY2;// = 479;
WORD wTempWidth, wTempHeight;
WORD wScale;// = IDM_100_SCALE;
int firstTime;// = TRUE;
BOOL bZoomMark;// = FALSE;
BOOL bRealGrab;// = FALSE;
short cxDib, cyDib;
int wTemp;
int m_MCpeParam[6];
public:
int WriteBMPFile();
void ModifyCancel();
void ModifyOK();
void ModifyWinY(int nWinY);
void ModifyWinX(int nWinX);
void ModifyHue(int nHue);
void ModifySaturate(int nSaturate);
void ModifyBright(int nBright);
void ModifyContrast(int nContrast);
BYTE* lpDib ; // Pointer of image data
DWORD dwDibSize;
int m_GrabWndHeight;
int m_GrabWndWidth;
ThreadRecord* m_pThreadRecord;
int InitCPE(HWND pWnd);
int SizeSet(HWND hWnd,int cxClient,int cyClient);
int RTStop();
void CPEExit();
void RTDisplay();
CCPEControl();
virtual ~CCPEControl();
};
#endif // !defined(AFX_CPECONTROL_H__F06D2E82_9E5D_11D2_A4BA_004033328274__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -