-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEditor.h
More file actions
94 lines (63 loc) · 1.99 KB
/
Copy pathEditor.h
File metadata and controls
94 lines (63 loc) · 1.99 KB
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
#pragma once
#include "Headers.h"
#define BUFSIZE MAX_PATH
#define IDM_FILE_NEW 1
#define IDM_FILE_OPEN 2
#define IDM_FILE_SETTINGS 12
#define IDM_FILE_EXIT 3
#define IDM_EDIT_COPY 4
#define IDM_EDIT_PASTE 5
#define IDM_EDIT_CUT 6
#define IDM_EDIT_STATUSCHECK 7
#define IDM_EDIT_ONTOP 8
#define IDM_WINDOW_WIREFRAME 9
#define IDM_WINDOW_SHADED 10
#define IDM_WINDOW_TEXTURED 11
#define IDM_SETTINGS_ONE 13
#define IDM_SETTINGS_TWO 14
#define IDM_SETTINGS_THREE 15
#define IDM_SETTINGS_FOUR 16
#define IDHK_CENTER 17
HTREEITEM ListViewAddItem(HWND hWnd, HTREEITEM hItem, LPWSTR lpwstr) {
TVINSERTSTRUCT insert;
insert = { 0 };
insert.hParent = hItem;
insert.hInsertAfter = TVI_LAST;
insert.item.mask = TVIF_TEXT;
insert.item.pszText = lpwstr;
insert.item.cchTextMax = 10;
//HTREEITEM test = TVM_INSERTITEM(0, &insert);
return TreeView_InsertItem(hWnd, &insert);
}
HWND CreateSidePanel(HWND hWnd) {
RECT rect;
GetWindowRect(hWnd, &rect);
HWND hSidePanel =
CreateWindowEx(0, WC_TREEVIEW, NULL,
WS_CHILD | WS_VISIBLE | WS_TABSTOP |
//TVS_HASLINES | TVS_LINESATROOT |
TVS_HASBUTTONS | WS_BORDER | TVS_FULLROWSELECT
, 0, 0, 120, rect.right - rect.left,
hWnd, 0, NULL, NULL);
//TVS_CHECKBOXES TVS_FULLROWSELECT TVS_EDITLABELS TVS_INFOTIP TVS_SHOWSELALWAYS
HTREEITEM hRoot;
TV_INSERTSTRUCT tvins;
tvins = { 0 };
tvins.hInsertAfter = TVI_ROOT;
tvins.item.mask = TVIF_TEXT;
tvins.item.pszText = L"Root";
tvins.item.cchTextMax = 10;
hRoot = TreeView_InsertItem(hSidePanel, &tvins);
//tvins.hInsertAfter = TVI_LAST;
//tvins.item.pszText = "Child";
//hChild = TreeView_InsertItem(hSidePanel, &tvins);
ListViewAddItem(hSidePanel, hRoot, L"test");
ListViewAddItem(hSidePanel, hRoot, L"cat");
ListViewAddItem(hSidePanel, ListViewAddItem(hSidePanel, hRoot, L"murder"), L"more");
tvins.hInsertAfter = TVI_ROOT;
tvins.item.mask = TVIF_TEXT;
tvins.item.pszText = L"Root2";
tvins.item.cchTextMax = 10;
hRoot = TreeView_InsertItem(hSidePanel, &tvins);
return hSidePanel;
}