-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathRecoverDlg.cpp
66 lines (42 loc) · 1.21 KB
/
RecoverDlg.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
// RecoverDlg.cpp : implementation file
//
#include "stdafx.h"
#include "DiskData.h"
#include "RecoverDlg.h"
// CRecoverDlg dialog
IMPLEMENT_DYNAMIC(CRecoverDlg, CDialog)
CRecoverDlg::CRecoverDlg(CWnd* pParent /*=NULL*/)
: CDialog(CRecoverDlg::IDD, pParent)
{
}
CRecoverDlg::~CRecoverDlg()
{
}
void CRecoverDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CRecoverDlg, CDialog)
ON_BN_CLICKED(IDSELECTFILE, OnBnClickedSelectfile)
END_MESSAGE_MAP()
// CRecoverDlg message handlers
void CRecoverDlg::OnBnClickedSelectfile()
{
CFileDialog cfile(false, "rec", "Recovered", OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT, 0);
if(cfile.DoModal() == IDOK)
{
m_strFilename = cfile.GetPathName();
CEdit* cedit = (CEdit*)this->GetDlgItem(IDC_FILESELECTED);
cedit->SetWindowText(m_strFilename);
}
}
BOOL CRecoverDlg::OnInitDialog()
{
CDialog::OnInitDialog();
CEdit* cedit = (CEdit*)this->GetDlgItem(IDC_FILENAME);
cedit->SetWindowText(m_strRecoverFile);
CEdit* cedit1 = (CEdit*)this->GetDlgItem(IDC_FILESELECTED);
cedit1->SetWindowText(m_strFilename);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}