#pragma once


// CECGSTWave

class CECGSTWave : public CStatic
{
	DECLARE_DYNAMIC(CECGSTWave)

public:
	CECGSTWave(int Width, int Height, int LeadType);
	virtual ~CECGSTWave();
	void Set_UnitLength_Value(int px);
	void draw_wave();
	void set_st_iso(int st,int iso);
protected:
	afx_msg void OnPaint();
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	DECLARE_MESSAGE_MAP()

private:
	CRect m_rectCtrl;			// 控件区域
	CDC dcMem; //用于缓冲作图的内存DC 
	CBitmap bmp; //内存中承载临时图象的位图
	CFont font;
	int m_i32Height;
	int m_i32Width;
	
	COLORREF m_color;
	//在屏幕上单位长度的像素点个数
	int UnitLength_Pixel;
	//波形的单位长度的数字量
	int UnitLength_Value;
	
	int m_i32Y1, m_i32Y2;
	int m_i32YLimit1,m_i32YLimit2;
	int m_i32ISO, m_i32ST;
	//波形互斥信号
	//	QMutex QMutexWaveDate;
	//波形的保存的缓存区
	INT16 *m_i16WaveDate[2];
	int  m_i16WaveDateLength;
	CCriticalSection m_CSWaveData;


	CPoint *m_pCPonit[2];

	CPen *penECGLine;
	CPen *penISO, *penST;
};


