-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathAppDlg.hpp
98 lines (83 loc) · 1.84 KB
/
AppDlg.hpp
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
/******************************************************************************
** (C) Chris Oldwood
**
** MODULE: APPDLG.HPP
** COMPONENT: The Application.
** DESCRIPTION: The CAppDlg class declaration.
**
*******************************************************************************
*/
// Check for previous inclusion
#ifndef APPDLG_HPP
#define APPDLG_HPP
#if _MSC_VER > 1000
#pragma once
#endif
#include <WCL/MainDlg.hpp>
#include <WCL/ListView.hpp>
#include <MDBL/FwdDecls.hpp>
#include <MDBL/SortColumns.hpp>
/******************************************************************************
**
** This is the main application dialog.
**
*******************************************************************************
*/
class CAppDlg : public CMainDlg
{
public:
//
// Constructors/Destructor.
//
CAppDlg();
//
// Methods.
//
void RefreshView();
void SelectNew();
void SelectAll();
void GetSelectedFiles(CResultSet& oRS);
//
// Members.
//
CListView m_lvGrid;
uint m_nSortColumn;
CSortColumns::Dir m_eSortOrder;
bool m_bShowAllFiles;
// Column indices.
enum Column
{
FILE_COLUMN,
TYPE_COLUMN,
DATE_COLUMN,
SIZE_COLUMN,
STATUS_COLUMN,
CACHE_COLUMN,
NUM_COLUMNS,
};
protected:
//
// Message processors.
//
virtual void OnInitDialog();
virtual void OnDestroy();
LRESULT OnGridSelchange(NMHDR& oHdr);
LRESULT OnGridRightClick(NMHDR& oHdr);
LRESULT OnGridClickColumn(NMHDR& oHdr);
//
// Internal methods.
//
CRow& GetRow(size_t nRow);
};
/******************************************************************************
**
** Implementation of inline functions.
**
*******************************************************************************
*/
inline CRow& CAppDlg::GetRow(size_t nRow)
{
ASSERT(nRow < m_lvGrid.ItemCount());
return *(static_cast<CRow*>(m_lvGrid.ItemPtr(nRow)));
}
#endif //APPDLG_HPP