/*
 *=======================================================================================
 * Name        :progbar.h
 *
 * Author      :Vincent lhullier			Date :15/07/97
 *
 * Description :a beautiful progress bar
 *=======================================================================================
 * Modification -> Author :                  Date :
 * Description :
 *=======================================================================================
 */

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#if !defined(AFX_PROGBAR_H__9367697B_F92A_11D0_8EF0_00609736731A__INCLUDED_)
#define AFX_PROGBAR_H__9367697B_F92A_11D0_8EF0_00609736731A__INCLUDED_
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

/*
 =======================================================================================
	Strutures
 =======================================================================================
 */
typedef struct tdstProgressBarDrawingData_
{
	COLORREF	xBackColor;
	COLORREF	xHeadColor;
	COLORREF	xTailColor;
	COLORREF	xTextColor;
	char		szText[40];
	UINT		uiAnimBitmap;
	char		cAnimNbFrames;
	char		cAnimFrameWidth;
} tdstProgressBarDrawingData;

/*
 =======================================================================================
	CMyProgressBar window
 =======================================================================================
 */
class CMyProgressBar : public CProgressCtrl
{
  // Construction
  public:
	CMyProgressBar();

  // Attributes
  public:
	BOOL		m_bInit;

	int			m_iStart;
	int			m_iEnd;

	CDC			m_oDC;
	CBitmap		m_oBitmap;

	CDC			m_oAnimDC;
	CBitmap		m_oAnimBitmap;
	char		m_cNumberOfFrames;
	char		m_cFrameWidth;
	char		m_cCurrentFrame;

	COLORREF	m_xBackgroundColor;
	COLORREF	m_xForegroundColor;



  // Operations
  public:
	void m_fn_vSetRange( int _iStart, int _iEnd );
	void m_fn_vReinit( void );

	void m_fn_vInitDC( void );

	void m_fn_vInitDrawing( COLORREF _xBackground = 0);
	void m_fn_vInitDrawing( int _iRed, int _iGreen, int _iBlue, COLORREF _xBackground = 0);
	void m_fn_vInitDrawing( UINT _uiBitmap, COLORREF _xForeground, COLORREF _xBackground = 0);
	void m_fn_vInitDrawing( tdstProgressBarDrawingData *_p_stPBDD );

	void m_fn_vInitAnim( UINT _uiBitmap, char _cFrame, char _cFrameWidht );

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

  // Implementation
  public:
	virtual ~CMyProgressBar();

	// Generated message map functions
  protected:
	//{{AFX_MSG(CMyProgressBar)
	afx_msg void OnPaint();
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_PROGBAR_H__9367697B_F92A_11D0_8EF0_00609736731A__INCLUDED_)

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/