meter.h

来自「winsail v2.0是用于DOS下的图形界面空间系统」· C头文件 代码 · 共 34 行

H
34
字号
#ifndef _METER_H__
#define _METER_H__


class CNumberCtrl
{
private:
	int m_nBoardColor;
	int m_nFillColor;
	int m_nBackColor;
public:
	void SetBoardColor (COLOR crColor){m_nBoardColor = crColor;}
	void SetFillColor  (COLOR crColor){m_nFillColor = crColor;}
	void SetBackColor  (COLOR crColor){m_nBackColor = crColor;}

public:
	void DrawNumber8(int nX,int nY,int nWidth,int nHeight,BOOL bHorz,BOOL bRed);
	void DrawNumber(int nIndex,int nLeft,int nTop,int nHorzWidth,int nVertWidth,int nThick);

public:
	CNumberCtrl();
};


void DrawMeter (int nX, int nY, int nWidth,
	int nHeight, int nThick, int nNumber);

inline void DrawMeter (int nX, int nY, int nWidth,
	int nHeight, int nThick, char ch)
{
	::DrawMeter (nX, nY, nWidth, nHeight, nThick, (int)(ch - '0'));
}

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?