-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathExpenseTypesDlg.hpp
81 lines (66 loc) · 1.62 KB
/
ExpenseTypesDlg.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
/******************************************************************************
** (C) Chris Oldwood
**
** MODULE: EXPENSETYPESDLG.HPP
** COMPONENT: The Application.
** DESCRIPTION: The CExpenseTypesDlg class declaration.
**
*******************************************************************************
*/
// Check for previous inclusion
#ifndef EXPENSETYPESDLG_HPP
#define EXPENSETYPESDLG_HPP
#if _MSC_VER > 1000
#pragma once
#endif
#include <WCL/CommonUI.hpp>
// Forward declarations.
class CExpenseTypes;
/******************************************************************************
**
** This dialog is used to maintain the expense types.
**
*******************************************************************************
*/
class CExpenseTypesDlg : public CDialog
{
public:
//
// Constructors/Destructor.
//
CExpenseTypesDlg(CExpenseTypes& oTypes, CValueSet& oUsed);
protected:
//
// Members.
//
CListBox m_lbTypes;
CExpenseTypes& m_oTypes;
CValueSet& m_oUsed;
//
// Message processors.
//
virtual void OnInitDialog();
virtual bool OnCancel();
void OnAdd();
void OnEdit();
void OnDelete();
void OnSelectType();
//
// Internal methods.
//
void UpdateUI();
CRow& ItemData(size_t nItem);
bool IsTypeInUse(int nID);
};
/******************************************************************************
**
** Implementation of inline functions.
**
*******************************************************************************
*/
inline CRow& CExpenseTypesDlg::ItemData(size_t nItem)
{
ASSERT(nItem < m_lbTypes.Count());
return *(static_cast<CRow*>(m_lbTypes.ItemPtr(nItem)));
}
#endif //EXPENSETYPESDLG_HPP