-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLeakDlg.hpp
55 lines (47 loc) · 1.49 KB
/
LeakDlg.hpp
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
#pragma once
#include "resource.h"
#include "DlgResizeHelper.h"
// This structure is used to keep track of leaked elements, the URL of their
// documents, and the number of references left outstanding.
//
struct LeakEntry {
LeakEntry(IUnknown* elem, BSTR url, int refCount) {
this->elem = elem;
this->url = url;
this->refCount = refCount;
}
IUnknown* elem;
BSTR url;
int refCount;
};
// The dialog box for displaying all leaked elements.
//
class CLeakDlg : public CDialog {
private:
enum { IDD = IDD_LEAKS };
CListCtrl m_leakList;
std::vector<LeakEntry> m_leaks;
DlgResizeHelper m_resizeHelper;
void clearLeaks();
void populateLeaks();
void updateButtons();
void showItemProperties(UINT nItem);
public:
CLeakDlg(CWnd* pParent = NULL);
void addElement(IUnknown* elem, BSTR url, int refCount);
DECLARE_MESSAGE_MAP()
virtual void DoDataExchange(CDataExchange* pDX);
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg UINT OnNcHitTest(CPoint point);
afx_msg void OnClose();
afx_msg void OnDestroy();
afx_msg void OnOk();
afx_msg void OnLvnItemActivateLeaklist(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnViewProperties();
afx_msg void OnLvnItemChangedLeaklist(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void CopySelectedItems();
afx_msg void OnLvnKeydownLeaklist(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
};