-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEvLogPg.Cpp
More file actions
115 lines (91 loc) · 2.66 KB
/
Copy pathEvLogPg.Cpp
File metadata and controls
115 lines (91 loc) · 2.66 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
// EventLoggingPage.Cpp : implementation file
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// This source code is only intended as a supplement to the
// Microsoft Classes Reference and related electronic
// documentation provided with the library.
// See these sources for detailed information regarding the
// Microsoft C++ Libraries products.
#include "StdAfx.H"
#include "TestCon.H"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CEventLoggingPage property page
IMPLEMENT_DYNCREATE(CEventLoggingPage, CPropertyPage)
CEventLoggingPage::CEventLoggingPage() :
CPropertyPage( CEventLoggingPage::IDD )
{
m_psp.dwFlags &= ~PSP_HASHELP;
//{{AFX_DATA_INIT(CEventLoggingPage)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
CEventLoggingPage::~CEventLoggingPage()
{
}
void CEventLoggingPage::DoDataExchange(CDataExchange* pDX)
{
int iEvent;
int iItem;
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CEventLoggingPage)
DDX_Control(pDX, IDC_EVENTS, m_lbEvents);
//}}AFX_DATA_MAP
if( m_lbEvents.GetCount() > 0 )
{
for( iEvent = 0; iEvent < m_astrEventNames.GetSize(); iEvent++ )
{
iItem = m_lbEvents.FindStringExact( -1, m_astrEventNames[iEvent] );
ASSERT( iItem != LB_ERR );
if( pDX->m_bSaveAndValidate )
{
m_atLogFlags[iEvent] = m_lbEvents.GetCheck( iItem );
}
else
{
m_lbEvents.SetCheck( iItem, m_atLogFlags[iEvent] != FALSE );
}
}
}
}
BEGIN_MESSAGE_MAP(CEventLoggingPage, CPropertyPage)
//{{AFX_MSG_MAP(CEventLoggingPage)
ON_WM_HELPINFO()
ON_WM_CONTEXTMENU()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CEventLoggingPage message handlers
BOOL CEventLoggingPage::OnInitDialog()
{
int iEvent;
CPropertyPage::OnInitDialog();
for( iEvent = 0; iEvent < m_astrEventNames.GetSize(); iEvent++ )
{
m_lbEvents.AddString( m_astrEventNames[iEvent] );
}
UpdateData( FALSE );
return( TRUE );
}
static DWORD rgmapCHID[] =
{
IDC_EVENTS, HIDC_EVENTS,
0, 0
};
BOOL CEventLoggingPage::OnHelpInfo( HELPINFO* pHelpInfo )
{
CString strPath = AfxGetApp()->m_pszHelpFilePath;
strPath += _T("::/popups.txt");
return ::HtmlHelp((HWND)pHelpInfo->hItemHandle, strPath, HH_TP_HELP_WM_HELP, DWORD(LPVOID(rgmapCHID))) != NULL;
}
void CEventLoggingPage::OnContextMenu( CWnd* pWnd, CPoint /* point */ )
{
CString strPath = AfxGetApp()->m_pszHelpFilePath;
strPath += _T("::/popups.txt");
::HtmlHelp((HWND)*pWnd, strPath, HH_TP_HELP_CONTEXTMENU, DWORD(LPVOID(rgmapCHID)));
}