summaryrefslogtreecommitdiff
path: root/NetCmpts/ProgressDlg.h
diff options
context:
space:
mode:
authorStef Walter <stef@thewalter.net>2003-09-17 19:07:23 +0000
committerStef Walter <stef@thewalter.net>2003-09-17 19:07:23 +0000
commit3f95d417d9e623ac0c74df8ef11d7a01846392dd (patch)
tree45ec73f2dc07eafd7f41a6f62a8cdfbaa279469f /NetCmpts/ProgressDlg.h
Initial ImportHEADmaster
Diffstat (limited to 'NetCmpts/ProgressDlg.h')
-rw-r--r--NetCmpts/ProgressDlg.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/NetCmpts/ProgressDlg.h b/NetCmpts/ProgressDlg.h
new file mode 100644
index 0000000..ecebaa8
--- /dev/null
+++ b/NetCmpts/ProgressDlg.h
@@ -0,0 +1,70 @@
+#if !defined(AFX_ADDINGFONTSDLG_H__C00DADE2_C0C4_11D1_80A7_444553540000__INCLUDED_)
+#define AFX_ADDINGFONTSDLG_H__C00DADE2_C0C4_11D1_80A7_444553540000__INCLUDED_
+
+#if _MSC_VER >= 1000
+#pragma once
+#endif // _MSC_VER >= 1000
+// ProgressDlg.h : header file
+//
+
+#include "resource.h"
+#include <atlwin.h>
+#include <atlctrls.h>
+
+#include "../common/events.h"
+
+/////////////////////////////////////////////////////////////////////////////
+// CProgressDlg dialog
+
+class CProgressDlg :
+ public CDialogImpl<CProgressDlg>,
+ public IDispEventImpl<0, CProgressDlg, &DIID_DShutdownEvents, &LIBID_NightSecShutdown, 2, 5>
+{
+// Construction
+public:
+ CProgressDlg(); // standard constructor
+ ~CProgressDlg()
+ { if(IsWindow()) DestroyWindow(); }
+
+// Dialog Data
+ enum { IDD = IDD_PROGRESS };
+ CProgressBarCtrl m_ctlProgress;
+
+
+// Implementation
+BEGIN_MSG_MAP(CNormalPage)
+ MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
+ COMMAND_HANDLER(IDCANCEL, BN_CLICKED, OnCancel)
+ MESSAGE_HANDLER(WM_CLOSE, OnClose)
+END_MSG_MAP()
+
+ // Generated message map functions
+ LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
+ LRESULT OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
+ LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
+
+// Catch Cancel Events
+BEGIN_SINK_MAP(CProgressDlg)
+ SINK_ENTRY_EX(0, DIID_DShutdownEvents, 1, OnCancelEv)
+END_SINK_MAP()
+
+// Status
+ bool IsCancelled()
+ { return m_bCancel; }
+
+// Events
+protected:
+ STDMETHOD(OnCancelEv)()
+ {
+ BOOL bHandled = TRUE;
+ OnCancel(0, 0, NULL, bHandled);
+ return S_OK;
+ };
+
+ bool m_bCancel;
+};
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_ADDINGFONTSDLG_H__C00DADE2_C0C4_11D1_80A7_444553540000__INCLUDED_)