-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathBreakPointDlg.cpp
79 lines (61 loc) · 1.92 KB
/
BreakPointDlg.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
#include "stdafx.h"
#include "BreakPointDlg.h"
#include "SettingsStorage.h"
#include "BreakPointsDlg.h"
CBreakPointDlg::CBreakPointDlg() : CDialogImpl<CBreakPointDlg>()
{
}
LRESULT CBreakPointDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
CenterWindow();
m_RequestEditCtrl.SubclassWindow(GetDlgItem(IDC_REQUEST));
m_ResponseEditCtrl.SubclassWindow(GetDlgItem(IDC_RESPONSE));
m_RequestEditCtrl.SetText(m_strRequest, SettingsStorage::GetStorage().GetColOutPT());
m_ResponseEditCtrl.SetText(m_strResponse, SettingsStorage::GetStorage().GetColOutPT());
return 0;
}
void CBreakPointDlg::SetResponseText(const CString& strResponse)
{
m_strResponse = strResponse;
m_strResponse.Replace("\r\n", "\n");
m_strResponse.Replace("\r", "\n");
m_strResponse.Replace("\n", "\r\n");
if (m_ResponseEditCtrl.IsWindow())
m_ResponseEditCtrl.SetText(m_strResponse, SettingsStorage::GetStorage().GetColInPT());
}
void CBreakPointDlg::SetRequestText(const CString& strRequest)
{
m_strRequest = strRequest;
m_strRequest.Replace("\r\n", "\n");
m_strRequest.Replace("\r", "\n");
m_strRequest.Replace("\n", "\r\n");
if (m_RequestEditCtrl.IsWindow())
m_RequestEditCtrl.SetText(m_strRequest, SettingsStorage::GetStorage().GetColOutPT());
}
void CBreakPointDlg::Show()
{
if (!IsWindow())
{
DoModal();
}
else
{
ShowWindow(SW_SHOW);
}
}
LRESULT CBreakPointDlg::OnBreakPointsSettings(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
CBreakPointsDlg dlg;
dlg.DoModal();
return 0;
}
LRESULT CBreakPointDlg::OnBnClickedCancel(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
EndDialog(wID);
return 0;
}
LRESULT CBreakPointDlg::OnBnClickedOk(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
EndDialog(wID);
return 0;
}