iconprogress.h

来自「非常有用的几个关于进度条的程序源码!希望给大家带来方便!」· C头文件 代码 · 共 111 行

H
111
字号
#if !defined(AFX_ICONPROGRESS_H__7E94ED0F_11CF_11D6_A183_92CD2146EB37__INCLUDED_)
#define AFX_ICONPROGRESS_H__7E94ED0F_11CF_11D6_A183_92CD2146EB37__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// IconProgress.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CIconProgress window

class CIconProgress : public CWnd
{
// Construction
public:
	CIconProgress();

	void Attach(UINT control_id,
				CWnd *parent,
				UINT icon_id, 
				int  increment, 
				int  stagger = 0);

	void Attach(UINT	 control_id,
				CWnd	 *parent,
				UINT	 icon_id, 
				int	     increment, 
				COLORREF background,
				int	     stagger = 0);

	void SetRange(short lower, 
				  short upper);
	
	void SetRange32(int lower, 
					int upper);
	
	void GetRange(int &lower,
				  int &upper);

	int SetPos(int position);

	int GetPos();
	
	int OffsetPos(int offset);

	int	SetStep(int step);

	int StepIt();

	void SetIconChange(UINT icon_id, int position);

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CIconProgress)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual		~CIconProgress();

private:
	int			GetNumberOfIcons(int position); 

	static const int   HORIZONTAL;
	static const int   VERTICAL;

	CBrush		background_brush;
	HICON		hicon;
	COLORREF	background_colour;
	int			icon_increment;
	int			orientation;
	int			total_number_of_icons;
	int			number_of_icons;
	int			icon_major;
	int			icon_minor;
	int			window_major;
	int			window_minor;
	int			start_major;
	int			start_minor;
	int			stagger_distance;
	int			upper;
	int			lower;
	int			position;
	int			step;
	RECT		window_rect;

	CArray<HICON, HICON> hicon_array;

	// Generated message map functions
protected:
	//{{AFX_MSG(CIconProgress)
	afx_msg void OnPaint();
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_ICONPROGRESS_H__7E94ED0F_11CF_11D6_A183_92CD2146EB37__INCLUDED_)

⌨️ 快捷键说明

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