diff options
Diffstat (limited to 'hammer/progdlg.h')
| -rw-r--r-- | hammer/progdlg.h | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/hammer/progdlg.h b/hammer/progdlg.h new file mode 100644 index 0000000..0438b6a --- /dev/null +++ b/hammer/progdlg.h @@ -0,0 +1,74 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +// +//=============================================================================// +// ProgDlg.h : header file +// CG: This file was added by the Progress Dialog component + +///////////////////////////////////////////////////////////////////////////// +// CProgressDlg dialog + +#ifndef __PROGDLG_H__ +#define __PROGDLG_H__ + +class CProgressDlg : public CDialog +{ +// Construction / Destruction +public: + CProgressDlg(UINT nCaptionID = 0); // standard constructor + ~CProgressDlg(); + + BOOL Create(CWnd *pParent=NULL); + + // Checking for Cancel button + BOOL CheckCancelButton(); + // Progress Dialog manipulation + void SetRange(int nLower,int nUpper); + int SetStep(int nStep); + int SetPos(int nPos); + int OffsetPos(int nPos); + int StepIt(); + +// Dialog Data + //{{AFX_DATA(CProgressDlg) + enum { IDD = CG_IDD_PROGRESS }; + CProgressCtrl m_Progress; + //}}AFX_DATA + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CProgressDlg) + public: + virtual BOOL DestroyWindow(); + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + UINT m_nCaptionID; + int m_nLower; + int m_nUpper; + int m_nStep; + + BOOL m_bCancel; + BOOL m_bParentDisabled; + + void ReEnableParent(); + + virtual void OnCancel(); + virtual void OnOK() {}; + void UpdatePercent(int nCurrent); + void PumpMessages(); + + // Generated message map functions + //{{AFX_MSG(CProgressDlg) + virtual BOOL OnInitDialog(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#endif // __PROGDLG_H__ |