Files
envi-code/SourceCode/Code2026/tg_shs/shs_public/TGSizeDescrWnd.h
T

49 lines
1.1 KiB
C++
Raw Normal View History

2026-10-04 00:04:20 +08:00
#if !defined(AFX_TGSIZEDESCRWND_H__83B97BBD_F9BE_487A_86EE_67A5902E65BE__INCLUDED_)
2026-09-28 15:28:50 +08:00
#define AFX_TGSIZEDESCRWND_H__83B97BBD_F9BE_487A_86EE_67A5902E65BE__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CTGSizeDescrWnd : public CStatic
{
public:
CTGSizeDescrWnd();
virtual ~CTGSizeDescrWnd();
2026-10-04 00:04:20 +08:00
//1表示饼
//2表示进度条
2026-09-28 15:28:50 +08:00
enum Style
{
kPie = 1,
kProcess = 2,
};
//dVal > 0 AND dVal < 1.0
void SetPer(double dVal);
double GetPer();
void SetStyle(Style eStyle);
int GetStyle();
CPoint CTGSizeDescrWnd::GetPerPoint(double dPer, int nWidthRadius, int nHeightRadius, const CPoint& ptCenter);
public:
//{{AFX_VIRTUAL(CTGSizeDescrWnd)
//}}AFX_VIRTUAL
protected:
//{{AFX_MSG(CTGSizeDescrWnd)
afx_msg void OnPaint();
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
double m_dPer;
Style m_eStyle;
void DrawPie(CDC *pDC);
void DrawProcess(CDC *pDC);
};
//{{AFX_INSERT_LOCATION}}
#endif // !defined(AFX_TGSIZEDESCRWND_H__83B97BBD_F9BE_487A_86EE_67A5902E65BE__INCLUDED_)