#pragma once


// CStaticValueTempNormal

class CStaticValueTempNormal : public CStatic
{
	DECLARE_DYNAMIC(CStaticValueTempNormal)

public:
	CStaticValueTempNormal();
	virtual ~CStaticValueTempNormal();

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_i16Temp;
	// 设置血氧饱和度上限
	INT16 m_i16TempH;
	// 设置血氧饱和度下限
	INT16 m_i16TempL;
	INT16 m_i16Unit;
	INT  m_i32Width, m_i32Height;
	INT m_i32Style;
	CRect m_rectCtrl;			// 控件区域
	CRect m_rectValue;			// 显示数值区域
	CDC dcMem; //用于缓冲作图的内存DC 
	CBitmap bmp; //内存中承载临时图象的位图
	CBitmap bitmapAlm;
	CDC dcMemAlm;
	CFont fontResultBig;
	CFont fontResult;
	CFont font;
	CFont font1;
	int m_i32ReDraw;
	int m_i32Unit;
	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_temp(INT16 t, UINT8 redraw);
	// 设置温度上限
	int set_temp_alm_H(INT16 h, UINT8 redraw);
	// 设置体温下限
	int set_temp_alm_L(INT16 l, UINT8 redraw);
	// 设置体温单位
	int set_temp_unit(INT16 u, UINT8 redraw);
	// 重画
	void Redraw();
	// 闪烁
	void Blink();
	void Set_Blink(int Blink);
	//设置、绘制报警开关标识
	void Set_AlmFlag(INT a, UINT8 redraw);
};


