⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iconprogress.h

📁 visual c++ 实例编程
💻 H
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -