-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui_accounts.h
61 lines (52 loc) · 1.36 KB
/
ui_accounts.h
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
#ifndef _UI_ACCOUNTS_H
#define _UI_ACCOUNTS_H
// include the MZFC library header file
#include <mzfc_inc.h>
// Popup window derived from CMzWndEx
class AccountList : public UiList {
public:
// override the DrawItem member function to do your own drawing of the list
AccountList() { idlist = 0; }
void DrawItem(HDC hdcDst, int nIndex, RECT* prcItem, RECT *prcWin, RECT *prcUpdate);
void setupList(int* i) { idlist = i; }
protected:
private:
int* idlist;
};
class Ui_AccountsWnd : public CMzWndEx {
MZ_DECLARE_DYNAMIC(Ui_AccountsWnd);
public:
void setHideAccount(int h){
_hideAccountId = h;
}
int getSelectionIndex() {
return _selection;
}
Ui_AccountsWnd() {
_mode = 0;
idarray = 0;
_hideAccountId = -1;
_sel_idx = -1;
}
//1: selection mode
void setMode(int m) { _mode = m; }
protected:
UiToolbar_Text m_Toolbar;
UiHeadingBar m_Caption1;
AccountList m_List;
// Initialization of the window (dialog)
virtual BOOL OnInitDialog();
// override the MZFC command handler
virtual void OnMzCommand(WPARAM wParam, LPARAM lParam);
// override the MZFC window messages handler
virtual LRESULT MzDefWndProc(UINT message, WPARAM wParam, LPARAM lParam);
//update display list
void updateList();
private:
int _mode;
int _selection;
int _hideAccountId;
int *idarray;
int _sel_idx;
};
#endif /*_UI_ACCOUNTS_H*/