-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDlgSetImageEditor.cpp
executable file
·52 lines (39 loc) · 1.09 KB
/
DlgSetImageEditor.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
// DlgSetImageEditor.cpp : implementation file
//
#include "stdafx.h"
#include "CdCoverCreator2.h"
#include "DlgSetImageEditor.h"
// CDlgSetImageEditor dialog
IMPLEMENT_DYNAMIC(CDlgSetImageEditor, CDialog)
CDlgSetImageEditor::CDlgSetImageEditor(CWnd* pParent /*=NULL*/)
: CDialog(CDlgSetImageEditor::IDD, pParent)
, m_strAppName(_T(""))
{
}
CDlgSetImageEditor::~CDlgSetImageEditor()
{
}
void CDlgSetImageEditor::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Text(pDX, IDC_EDIT1, m_strAppName);
}
BEGIN_MESSAGE_MAP(CDlgSetImageEditor, CDialog)
ON_BN_CLICKED(IDC_BUTTON1, OnBnClickedButton1)
END_MESSAGE_MAP()
// CDlgSetImageEditor message handlers
void CDlgSetImageEditor::OnBnClickedButton1()
{
CFileDialog dlg (TRUE, "*.exe", "*.exe", OFN_HIDEREADONLY, "Programs (*.exe)", this);
if (dlg.DoModal () == IDOK)
{
m_strAppName = dlg.GetPathName ();
UpdateData (FALSE);
}
}
void CDlgSetImageEditor::OnOK()
{
UpdateData ();
AfxGetApp ()->WriteProfileString ("ImageEditing", "app", m_strAppName);
CDialog::OnOK();
}