2f01ec6b875f282b5563d6839684d849fcbcdb4f
[reactos.git] / rosapps / control / 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
36
37 #define STATUS_WINDOW 2001
38 #define TREE_WINDOW 2002
39 #define LIST_WINDOW 2003
40
41 #define MAX_LOADSTRING 100
42 #define SPLIT_WIDTH 5
43 #define MAX_NAME_LEN 500
44
45
46 ////////////////////////////////////////////////////////////////////////////////
47
48 enum OPTION_FLAGS {
49 OPTIONS_AUTO_REFRESH = 0x01,
50 OPTIONS_READ_ONLY_MODE = 0x02,
51 OPTIONS_CONFIRM_ON_DELETE = 0x04,
52 OPTIONS_SAVE_ON_EXIT = 0x08,
53 OPTIONS_DISPLAY_BINARY_DATA = 0x10,
54 OPTIONS_VIEW_TREE_ONLY = 0x20,
55 OPTIONS_VIEW_DATA_ONLY = 0x40,
56 };
57
58 typedef struct {
59 HWND hWnd;
60 HWND hTreeWnd;
61 HWND hListWnd;
62 int nFocusPanel; // 0: left 1: right
63 int nSplitPos;
64 WINDOWPLACEMENT pos;
65 TCHAR szPath[MAX_PATH];
66 } ChildWnd;
67
68 ////////////////////////////////////////////////////////////////////////////////
69 // Global Variables:
70 //
71 extern HINSTANCE hInst;
72 extern HWND hFrameWnd;
73 extern HMENU hMenuFrame;
74 extern HWND hStatusBar;
75 extern HFONT hFont;
76 extern enum OPTION_FLAGS Options;
77
78 extern TCHAR szTitle[];
79 extern TCHAR szWindowClass[];
80
81 #ifndef _MSC_VER
82 typedef struct tagNMITEMACTIVATE{
83 NMHDR hdr;
84 int iItem;
85 int iSubItem;
86 UINT uNewState;
87 UINT uOldState;
88 UINT uChanged;
89 POINT ptAction;
90 LPARAM lParam;
91 UINT uKeyFlags;
92 } NMITEMACTIVATE, FAR *LPNMITEMACTIVATE;
93 #endif
94
95 #ifdef __cplusplus
96 };
97 #endif
98
99 #endif // __MAIN_H__