Updated treeview and listview functionality.
[reactos.git] / rosapps / regedit / main.h
1 /*
2 * ReactOS regedit
3 *
4 * main.h
5 *
6 * Copyright (C) 2002 Robert Dickenson <robd@reactos.org>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23 #ifndef __MAIN_H__
24 #define __MAIN_H__
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30 #if _MSC_VER > 1000
31 #pragma once
32 #endif // _MSC_VER > 1000
33
34 #include "resource.h"
35 #include "regproc.h"
36
37
38 #define STATUS_WINDOW 2001
39 #define TREE_WINDOW 2002
40 #define LIST_WINDOW 2003
41 #define SPLIT_WINDOW 2004
42
43 #define MAX_LOADSTRING 100
44 #define SPLIT_WIDTH 3
45 #define MAX_NAME_LEN 500
46
47
48 typedef struct _Entry {
49 struct _Entry* next;
50 struct _Entry* down;
51 struct _Entry* up;
52 BOOL expanded;
53 BOOL scanned;
54 int level;
55 BOOL bKey; // key or value?
56 HKEY hKey;
57 // BOOL bRoot;
58 HTREEITEM hTreeItem;
59 TCHAR szName[MAX_NAME_LEN];
60 } Entry;
61
62
63 typedef struct {
64 Entry entry;
65 TCHAR path[MAX_PATH];
66 // DWORD _flags;
67 } Root;
68
69 typedef struct {
70 HWND hWnd;
71 HWND hTreeWnd;
72 HWND hListWnd;
73 int nFocusPanel; // 0: left 1: right
74 WINDOWPLACEMENT pos;
75 int nSplitPos;
76 Root root;
77 } ChildWnd;
78
79
80 ////////////////////////////////////////////////////////////////////////////////
81 // Global Variables:
82 //
83 extern HINSTANCE hInst;
84 extern HWND hFrameWnd;
85 extern HWND hStatusBar;
86 extern HMENU hMenuFrame;
87
88 extern TCHAR szTitle[];
89 extern TCHAR szFrameClass[];
90 extern TCHAR szChildClass[];
91
92 #ifndef _MSC_VER
93 typedef struct tagNMITEMACTIVATE{
94 NMHDR hdr;
95 int iItem;
96 int iSubItem;
97 UINT uNewState;
98 UINT uOldState;
99 UINT uChanged;
100 POINT ptAction;
101 LPARAM lParam;
102 UINT uKeyFlags;
103 } NMITEMACTIVATE, FAR *LPNMITEMACTIVATE;
104 #endif
105
106 #ifdef __cplusplus
107 };
108 #endif
109
110 #endif // __MAIN_H__