1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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_)
|