#pragma once


// CStaticValueECGNormal

class CStaticValueECGNormal : public CStatic
{
	DECLARE_DYNAMIC(CStaticValueECGNormal)

public:
	CStaticValueECGNormal();
	virtual ~CStaticValueECGNormal();

protected:
	afx_msg void OnPaint();
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	DECLARE_MESSAGE_MAP()
private:
	// 设置心律
	INT16 m_i16HR;
	// 设置ST1的值
	INT16 m_i16ST1, m_i16ST2;
	// 设置心律报警上限
	INT16 m_i16HRH;
	// 设置心律报警下限
	INT16 m_i16HRL;
	// 心搏标识
	UINT8 m_u8Beat;
	// 心律来源
	UINT8 m_u8HRFrom;
	// 设置PVCs值
	INT16 m_i16PVCs;
	// 设置起搏
	INT16 m_i16Pace;


	INT  m_i32Width, m_i32Height;
	INT m_i32Style;
	CRect m_rectCtrl;			// 控件区域
	CRect m_rectValue;			// 显示数值区域
	CDC dcMem; //用于缓冲作图的内存DC 
	CBitmap bmp; //内存中承载临时图象的位图
	CBitmap bitmaBeat;
	CBitmap bitmapAlm;
	CDC dcMemBeat;
	CDC dcMemAlm;
	CFont fontHR;
	CFont fontHRBig;
	CFont fontHRAlm;
	CFont font;
	int m_i32ReDraw;
	int m_i32BlinkNum;
	int m_i32Blink;
	INT m_i32AlmFlag;
public:
	static COLORREF m_rgbBlink;
	static COLORREF m_rgbText;
	static INT m_i32NormalWidth, m_i32NormalHeight;
	static INT m_i32BigWidth, m_i32BigHeight;

	static INT m_i32NormalX, m_i32NormalY;
	static INT m_i32BigX, m_i32BigY;

	void Set_Style(INT style);
	// 设置心律
	int set_HR(INT16 hr,UINT8 redraw);
	// 设置ST1的值
	int set_ST1(INT16 st1, UINT8 redraw);
	// 设置ST2的值
	int set_ST2(INT16 st2, UINT8 redraw);
	// 设置心律报警上限
	int set_HR_Alm_H(INT16 h, UINT8 redraw);
	// 设置心律报警下限
	int set_HR_Alm_L(INT16 l, UINT8 redraw);
	// 心搏标识
	int set_beat(INT16 b, UINT8 redraw);
	// 心律来源
	int set_HR_from(INT16 f, UINT8 redraw);
	// 设置PVCs值
	int set_PVCs(INT16 p, UINT8 redraw);
	// 设置起搏
	int set_pace(INT16 p, UINT8 redraw);
	// 重画
	void Redraw();
	// 闪烁
	void Blink();
	void Set_Blink(int Blink);
	//设置、绘制报警开关标识
	void Set_AlmFlag(INT a, UINT8 redraw);
};


