#pragma once


// CStaticValueRespNormal

class CStaticValueRespNormal : public CStatic
{
	DECLARE_DYNAMIC(CStaticValueRespNormal)

public:
	CStaticValueRespNormal();
	virtual ~CStaticValueRespNormal();

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_i16RR;
	// 设置呼吸率报警上限
	INT16 m_i16RRH;
	// 设置呼吸率报警下限
	INT16 m_i16RRL;
	

	INT  m_i32Width, m_i32Height;
	INT m_i32Style;
	CRect m_rectCtrl;			// 控件区域
	CRect m_rectValue;			// 显示数值区域
	CDC dcMem; //用于缓冲作图的内存DC 
	CBitmap bmp; //内存中承载临时图象的位图
	CBitmap bitmapAlm;
	CDC dcMemAlm;
	CFont fontResult;
	CFont fontResultBig;
	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_RR(INT16 r, UINT8 redraw);
	// 设置呼吸率上限
	int set_resp_alm_H(INT16 h, UINT8 redraw);
	// 设置呼吸率下限
	int set_resp_alm_L(INT16 l, UINT8 redraw);
	// 重画
	void Redraw();
	// 闪烁
	void Blink();
	void Set_Blink(int Blink);
	//设置、绘制报警开关标识
	void Set_AlmFlag(INT a, UINT8 redraw);
};


