#if !defined(AFX_PROGRESSDIALOG_H__09D80542_6467_11D3_85F5_00609419FCC1__INCLUDED_)
#define AFX_PROGRESSDIALOG_H__09D80542_6467_11D3_85F5_00609419FCC1__INCLUDED_

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

class CProgressDialog;

// the real thing to use
class CProgress
{
public:
	CProgress(bool interruptable, const char *title = 0L);
	~CProgress();

	inline bool HasAborted(void) const { return m_abort; }
	void SetProgress(int percent);
	void DoAbort(void);

protected:
	CProgressDialog *m_dlg;
	bool m_abort;
};

/////////////////////////////////////////////////////////////////////////////
// CProgressDialog dialog

class CProgressDialog : public CDialog
{
// Construction
public:
	CProgressDialog(bool & abort, bool interruptable, CWnd* pParent = NULL);   // standard constructor
	BOOL Create();

// Dialog Data
	//{{AFX_DATA(CProgressDialog)
	enum { IDD = IDD_PROGRESS };
	CProgressCtrl	m_progress;
	//}}AFX_DATA

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CProgressDialog)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual void PostNcDestroy();
	//}}AFX_VIRTUAL

// Implementation
protected:
	virtual void OnOK();

	CWnd* m_pParent;
	bool & m_abort;
	bool m_stopable;
	HWND hWndParent;

	// Generated message map functions
	//{{AFX_MSG(CProgressDialog)
	virtual BOOL OnInitDialog();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_PROGRESSDIALOG_H__09D80542_6467_11D3_85F5_00609419FCC1__INCLUDED_)
