-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDumpInfoDlg.cpp
81 lines (62 loc) · 1.82 KB
/
DumpInfoDlg.cpp
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
// DumpInfoDlg.cpp : 實作檔
//
#include "stdafx.h"
#include "HookRepairer.h"
#include "DumpInfoDlg.h"
#include "afxdialogex.h"
BEGIN_EASYSIZE_MAP(CDumpInfoDlg)
EASYSIZE(IDC_TXTDUMP, ES_BORDER, ES_BORDER, ES_BORDER, ES_BORDER, 0)
END_EASYSIZE_MAP
// CDumpInfoDlg 對話方塊
IMPLEMENT_DYNAMIC(CDumpInfoDlg, CDialog)
CDumpInfoDlg::CDumpInfoDlg(CWnd* pParent /*=NULL*/)
: CDialog(IDD_DLGDUMPINFO, pParent)
{
}
CDumpInfoDlg::~CDumpInfoDlg()
{
}
void CDumpInfoDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_TXTDUMP, m_txtDump);
}
BEGIN_MESSAGE_MAP(CDumpInfoDlg, CDialog)
ON_WM_CLOSE()
ON_WM_SIZE()
END_MESSAGE_MAP()
// CDumpInfoDlg 訊息處理常式
void CDumpInfoDlg::OnClose()
{
// TODO: 在此加入您的訊息處理常式程式碼和 (或) 呼叫預設值
vector<HookInfo>().swap(m_vecDumpInfo);
CDialog::OnClose();
}
BOOL CDumpInfoDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: 在此加入額外的初始化
CString result = (m_vecDumpInfo[0].m_strProcName + "\r\n\r\n");
CString tab = "\t", csAddr, csBytes, csCode;
csAddr.Format( "%-10s", "Address:" );
csBytes.Format("%-32s", "Bytes:");
csCode.Format("%-40s", "Code:");
result += ("Size:" + tab + csAddr + tab + csBytes + tab + csCode + "\r\n");
for (auto dp : m_vecDumpInfo)
{
result += (dp.m_strDLength + tab + dp.m_strAddr + tab+ dp.m_strBytes + tab + dp.m_strCode + "\r\n");
} // for
m_txtDump.SetWindowTextA(result);
m_txtDump.ShowScrollBar(SB_VERT, TRUE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX 屬性頁應傳回 FALSE
}
void CDumpInfoDlg::OnSize(UINT nType, int cx, int cy)
{
CDialog::OnSize(nType, cx, cy);
if (nType != SIZE_MINIMIZED)
{
UPDATE_EASYSIZE;
} // if
// TODO: 在此加入您的訊息處理常式程式碼
}