www.pudn.com > Éù²¨ÆµÂÊÏÔʾ .zip > VuMeterCtrl.h
#if !defined(AFX_VUMETERCTRL_H__308163D1_9A07_408B_8D97_F595742A8E29__INCLUDED_)
#define AFX_VUMETERCTRL_H__308163D1_9A07_408B_8D97_F595742A8E29__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// VuMeterCtrl.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CVuMeterCtrl window
class CVuMeterCtrl : public CStatic
{
// Construction
public:
CVuMeterCtrl();
// Attributes
public:
// Operations
public:
void SetRange(int nMin, int nMax);
void SetValue(int nValue);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CVuMeterCtrl)
protected:
virtual void PreSubclassWindow();
//}}AFX_VIRTUAL
protected:
// Generated message map functions
CDC m_MainDC;
CBitmap m_MainBitmap;
CBitmap *m_pOldBitmap;
void DrawCtrl();
// Implementation
public:
void SetSmooth(BOOL bSmooth = TRUE);
void SetVertical(BOOL bVertical);
void SetColors(COLORREF clrStart, COLORREF clrEnd);
virtual ~CVuMeterCtrl();
//{{AFX_MSG(CVuMeterCtrl)
afx_msg void OnPaint();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnDestroy();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
protected:
int m_nCurVal; // Current progress value
int m_nMinVal; // Minimum progress value
int m_nMaxVal; // Maximum progress value
COLORREF m_clrStart;
COLORREF m_clrEnd;
BOOL m_bVertical;
BOOL m_bSmooth;
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_VUCTRL_H__308163D1_9A07_408B_8D97_F595742A8E29__INCLUDED_)