-
Notifications
You must be signed in to change notification settings - Fork 2
/
DetectedDlg.cpp
103 lines (90 loc) · 2.33 KB
/
DetectedDlg.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/******************************************************************************
** (C) Chris Oldwood
**
** MODULE: DETECTEDDLG.CPP
** COMPONENT: The Application
** DESCRIPTION: CDetectedDlg class definition.
**
*******************************************************************************
*/
#include "Common.hpp"
#include "DetectedDlg.hpp"
#include "UTCMGRApp.hpp"
#include "HelpTopics.h"
/******************************************************************************
** Method: Default constructor.
**
** Description: .
**
** Parameters: None.
**
** Returns: Nothing.
**
*******************************************************************************
*/
CDetectedDlg::CDetectedDlg()
: CDialog(IDD_DETECTED)
{
DEFINE_CTRL_TABLE
CTRL(IDC_PROFILES, &m_lvProfiles)
END_CTRL_TABLE
DEFINE_CTRLMSG_TABLE
END_CTRLMSG_TABLE
}
/******************************************************************************
** Method: OnInitDialog()
**
** Description: Initialise the dialog.
**
** Parameters: None.
**
** Returns: Nothing.
**
*******************************************************************************
*/
void CDetectedDlg::OnInitDialog()
{
ASSERT(m_astrNames.Size() == m_astrFolders.Size());
// Initialise ListView style.
m_lvProfiles.InsertColumn(0, TXT("Profile"), 100, LVCFMT_LEFT);
m_lvProfiles.InsertColumn(1, TXT("Folder"), 225, LVCFMT_LEFT);
m_lvProfiles.FullRowSelect(true);
// Add profiles to grid.
for (size_t i = 0; i < m_astrNames.Size(); ++i)
{
size_t n = m_lvProfiles.ItemCount();
m_lvProfiles.InsertItem(n, m_astrNames[i] );
m_lvProfiles.ItemText (n, 1, m_astrFolders[i]);
}
}
/******************************************************************************
** Method: OnOk()
**
** Description: The OK button was pressed.
**
** Parameters: None.
**
** Returns: true or false.
**
*******************************************************************************
*/
bool CDetectedDlg::OnOk()
{
return true;
}
/******************************************************************************
** Method: OnHelp()
**
** Description: Help requested for the dialog.
**
** Parameters: See HELPINFO.
**
** Returns: Nothing.
**
*******************************************************************************
*/
void CDetectedDlg::OnHelp(HELPINFO& /*oInfo*/)
{
// Show the dialogs help topic.
App.m_oHelpFile.Topic(IDH_DETECTEDDLG);
}