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