-
Notifications
You must be signed in to change notification settings - Fork 40
/
ChooseExecutable.cpp
57 lines (41 loc) · 1.1 KB
/
ChooseExecutable.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
// ChooseExecutable.cpp : 实现文件
//
#include "stdafx.h"
#include "Keeper.h"
#include "ChooseExecutable.h"
#include "afxdialogex.h"
// CChooseExecutable 对话框
IMPLEMENT_DYNAMIC(CChooseExecutable, CDialog)
CChooseExecutable::CChooseExecutable(const vector<CString> &files, CWnd* pParent)
: CDialog(CChooseExecutable::IDD, pParent)
, m_StrExecutable(_T(""))
{
m_Files.assign(files.begin(), files.end());
}
CChooseExecutable::~CChooseExecutable()
{
}
void CChooseExecutable::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_EXECUTABLE_COMBO, m_ComboExecutable);
DDX_CBString(pDX, IDC_EXECUTABLE_COMBO, m_StrExecutable);
}
BEGIN_MESSAGE_MAP(CChooseExecutable, CDialog)
END_MESSAGE_MAP()
// CChooseExecutable 消息处理程序
CString CChooseExecutable::GetExecutable() const
{
return m_StrExecutable;
}
BOOL CChooseExecutable::OnInitDialog()
{
CDialog::OnInitDialog();
int i = 0;
for (vector<CString>::const_iterator pos = m_Files.begin(); pos != m_Files.end(); ++pos)
{
m_ComboExecutable.InsertString(i++, *pos);
}
m_ComboExecutable.SetCurSel(0);
return TRUE;
}