From 3f95d417d9e623ac0c74df8ef11d7a01846392dd Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 17 Sep 2003 19:07:23 +0000 Subject: Initial Import --- NetCmpts/ProgressDlg.h | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 NetCmpts/ProgressDlg.h (limited to 'NetCmpts/ProgressDlg.h') 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 +#include + +#include "../common/events.h" + +///////////////////////////////////////////////////////////////////////////// +// CProgressDlg dialog + +class CProgressDlg : + public CDialogImpl, + 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_) -- cgit v1.2.3