991fe72bd0e0fee5ed1ff7aaf1564a05b9e8dba0
[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 typedef struct _Entry {
39 struct _Entry* next;
40 struct _Entry* down;
41 struct _Entry* up;
42 BOOL expanded;
43 BOOL scanned;
44 int level;
45 BOOL bKey; // key or value?
46 HKEY hKey;
47 // BOOL bRoot;
48 HTREEITEM hTreeItem;
49 } Entry;
50
51
52 typedef struct {
53 Entry entry;
54 TCHAR path[MAX_PATH];
55 // DWORD _flags;
56 } Root;
57
58 typedef struct {
59 HWND hWnd;
60 HWND hTreeWnd;
61 HWND hListWnd;
62 int nFocusPanel; // 0: left 1: right
63 WINDOWPLACEMENT pos;
64 int nSplitPos;
65 Root root;
66 } ChildWnd;
67
68
69 #define STATUS_WINDOW 2001
70 #define TREE_WINDOW 2002
71 #define LIST_WINDOW 2003
72 #define SPLIT_WINDOW 2004
73
74 #define MAX_LOADSTRING 100
75 #define SPLIT_WIDTH 3
76
77 ////////////////////////////////////////////////////////////////////////////////
78 // Global Variables:
79 //
80 extern HINSTANCE hInst;
81 extern HWND hFrameWnd;
82 extern HWND hStatusBar;
83 extern HMENU hMenuFrame;
84
85 extern TCHAR szTitle[];
86 extern TCHAR szFrameClass[];
87 extern TCHAR szChildClass[];
88
89 #ifndef _MSC_VER
90 typedef struct tagNMITEMACTIVATE{
91 NMHDR hdr;
92 int iItem;
93 int iSubItem;
94 UINT uNewState;
95 UINT uOldState;
96 UINT uChanged;
97 POINT ptAction;
98 LPARAM lParam;
99 UINT uKeyFlags;
100 } NMITEMACTIVATE, FAR *LPNMITEMACTIVATE;
101 #endif
102
103 #ifdef __cplusplus
104 };
105 #endif
106
107 #endif // __MAIN_H__