Repository navigation
Expand file tree
/
Copy pathCExportFileTypeDlg.cpp
More file actions
125 lines (100 loc) · 2.57 KB
/
Copy pathCExportFileTypeDlg.cpp
File metadata and controls
125 lines (100 loc) · 2.57 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
116
117
118
119
120
121
122
123
124
125
// CExportFileTypeDlg.cpp : implementation file
//
#include "pch.h"
#include "NetDesigner.h"
#include "CExportFileTypeDlg.h"
#include "afxdialogex.h"
// CExportFileTypeDlg dialog
int my_c_file = 0;
IMPLEMENT_DYNAMIC(CExportFileTypeDlg, CDialog)
CExportFileTypeDlg::CExportFileTypeDlg(CWnd* pParent /*=nullptr*/)
: CDialog(IDD_EXPORT, pParent)
{
m_c_file = my_c_file;
}
CExportFileTypeDlg::~CExportFileTypeDlg()
{
}
void CExportFileTypeDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//DDX_Radio(pDX, IDC_RADIO3, m_text_file);
//DDX_Radio(pDX, IDC_RADIO2, m_swift_file);
DDX_Radio(pDX, IDC_RADIO1, m_c_file);
}
BEGIN_MESSAGE_MAP(CExportFileTypeDlg, CDialog)
ON_WM_CTLCOLOR()
ON_BN_CLICKED(IDC_RADIO1, &CExportFileTypeDlg::OnBnClickedRadio1)
ON_BN_CLICKED(IDC_RADIO2, &CExportFileTypeDlg::OnBnClickedRadio2)
ON_BN_CLICKED(IDC_RADIO3, &CExportFileTypeDlg::OnBnClickedRadio3)
END_MESSAGE_MAP()
// CExportFileTypeDlg message handlers
BOOL CExportFileTypeDlg::OnInitDialog()
{
CDialog::OnInitDialog();
mbrush.CreateSolidBrush(GetGlobalData()->clrBarFace);
mbrush2.CreateSolidBrush(GetGlobalData()->clrActiveCaption);
OnBnClickedRadio1();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CExportFileTypeDlg::OnOK()
{
UpdateData();
/*if (m_c_file == 0) {
AfxMessageBox(_T("c code"));
}
else if (m_c_file == 1) {
AfxMessageBox(_T("swift code"));
}
else if (m_c_file == 2) {
AfxMessageBox(_T("text file"));
}*/
my_c_file = m_c_file;
CDialog::OnOK();
}
HBRUSH CExportFileTypeDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
hbr = mbrush;
switch (nCtlColor)
{
case CTLCOLOR_STATIC:
pDC->SetTextColor(GetGlobalData()->clrGrayedText);
pDC->SetBkMode(TRANSPARENT);
break;
case CTLCOLOR_BTN:
pDC->SetTextColor(RGB(255, 0, 0));
break;
case CTLCOLOR_DLG:
pDC->SetTextColor(RGB(255, 255, 0));
break;
case CTLCOLOR_EDIT:
hbr = mbrush2;
pDC->SetTextColor(GetGlobalData()->clrGrayedText);
pDC->SetBkMode(TRANSPARENT);
break;
case CTLCOLOR_LISTBOX:
hbr = mbrush2;
pDC->SetTextColor(GetGlobalData()->clrGrayedText);
break;
case CTLCOLOR_MSGBOX:
pDC->SetTextColor(RGB(255, 0, 255));
break;
case CTLCOLOR_SCROLLBAR:
pDC->SetTextColor(RGB(0, 0, 255));
break;
default:
pDC->SetTextColor(GetGlobalData()->clrGrayedText);
}
return hbr;
}
void CExportFileTypeDlg::OnBnClickedRadio1()
{
}
void CExportFileTypeDlg::OnBnClickedRadio2()
{
}
void CExportFileTypeDlg::OnBnClickedRadio3()
{
}