ReactOS  0.4.12-dev-43-g63b00d8
main.h
Go to the documentation of this file.
1 /*
2  * Regedit definitions
3  *
4  * Copyright (C) 2002 Robert Dickenson <robd@reactos.org>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #pragma once
22 
23 #include "resource.h"
24 
25 
26 #define STATUS_WINDOW 2001
27 #define TREE_WINDOW 2002
28 #define LIST_WINDOW 2003
29 
30 #define SPLIT_WIDTH 5
31 #define SPLIT_MIN 30
32 
33 #define COUNT_OF(a) (sizeof(a)/sizeof(a[0]))
34 
35 #define PM_MODIFYVALUE 0
36 #define PM_NEW 1
37 #define PM_TREECONTEXT 2
38 #define PM_HEXEDIT 3
39 
40 #define MAX_NEW_KEY_LEN 128
41 
42 extern HINSTANCE hInst;
43 
44 /******************************************************************************/
45 
47 {
55 };
56 
57 typedef struct
58 {
64  int nFocusPanel; /* 0: left 1: right */
65  int nSplitPos;
68 } ChildWnd;
69 extern ChildWnd* g_pChildWnd;
70 
71 /*******************************************************************************
72  * Global Variables:
73  */
75 extern HWND hFrameWnd;
76 extern HMENU hMenuFrame;
77 extern HWND hStatusBar;
78 extern HMENU hPopupMenus;
79 extern HFONT hFont;
80 extern enum OPTION_FLAGS Options;
81 
82 extern WCHAR szTitle[];
83 extern WCHAR szFrameClass[];
84 extern WCHAR szChildClass[];
85 
86 extern const WCHAR g_szGeneralRegKey[];
87 
88 /* about.c */
89 extern void ShowAboutBox(HWND hWnd);
90 
91 /* childwnd.c */
93 extern void ResizeWnd(int cx, int cy);
94 extern LPCWSTR get_root_key_name(HKEY hRootKey);
95 
96 /* error.c */
97 extern int ErrorMessageBox(HWND hWnd, LPCWSTR lpTitle, DWORD dwErrorCode, ...);
98 extern int InfoMessageBox(HWND hWnd, UINT uType, LPCWSTR lpTitle, LPCWSTR lpMessage, ...);
99 
100 /* find.c */
101 extern void FindDialog(HWND hWnd);
102 extern BOOL FindNext(HWND hWnd);
103 
104 /* framewnd.c */
106 extern void SetupStatusBar(HWND hWnd, BOOL bResize);
107 extern void UpdateStatusBar(void);
108 extern BOOL CopyKeyName(HWND hWnd, HKEY hRootKey, LPCWSTR keyName);
110 
111 /* listview.c */
113 extern BOOL RefreshListView(HWND hwndLV, HKEY hKey, LPCWSTR keyPath);
114 extern LPCWSTR GetValueName(HWND hwndLV, int iStartAt);
116 extern BOOL IsDefaultValue(HWND hwndLV, int i);
117 
118 /* regedit.c */
119 LPCWSTR getAppName(void);
120 
121 /* treeview.c */
122 extern HWND CreateTreeView(HWND hwndParent, LPWSTR pHostName, HMENU id);
123 extern BOOL RefreshTreeView(HWND hWndTV);
124 extern BOOL RefreshTreeItem(HWND hwndTV, HTREEITEM hItem);
125 extern BOOL OnTreeExpanding(HWND hWnd, NMTREEVIEW* pnmtv);
126 extern LPCWSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY* phRootKey);
127 extern BOOL DeleteNode(HWND hwndTV, HTREEITEM hItem);
129 extern HWND StartKeyRename(HWND hwndTV);
130 extern BOOL CreateNewKey(HWND hwndTV, HTREEITEM hItem);
131 extern BOOL SelectNode(HWND hwndTV, LPCWSTR keyPath);
132 extern void DestroyTreeView(HWND hwndTV);
133 extern void DestroyListView(HWND hwndLV);
134 extern void DestroyMainMenu(void);
135 
136 /* edit.c */
137 extern BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCWSTR valueName, BOOL EditBin);
138 extern BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath);
139 extern LONG RenameKey(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpNewName);
140 extern LONG RenameValue(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpDestValue, LPCWSTR lpSrcValue);
141 extern LONG QueryStringValue(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpValueName, LPWSTR pszBuffer, DWORD dwBufferLen);
142 extern BOOL GetKeyName(LPWSTR pszDest, size_t iDestLength, HKEY hRootKey, LPCWSTR lpSubKey);
143 
144 /* security.c */
145 extern BOOL RegKeyEditPermissions(HWND hWndOwner, HKEY hKey, LPCWSTR lpMachine, LPCWSTR lpKeyName);
146 
147 /* settings.c */
148 extern void LoadSettings(void);
149 extern void SaveSettings(void);
150 
151 /* EOF */
void SaveSettings(void)
Definition: settings.c:113
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
const WCHAR g_szGeneralRegKey[]
Definition: settings.c:16
BOOL IsDefaultValue(HWND hwndLV, int i)
Definition: listview.c:107
LRESULT CALLBACK ChildWndProc(HWND, UINT, WPARAM, LPARAM)
Definition: childwnd.c:385
__wchar_t WCHAR
Definition: xmlstorage.h:180
HWND hTreeWnd
Definition: main.h:60
HWND hListWnd
Definition: main.h:61
#define CALLBACK
Definition: compat.h:27
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
BOOL ExportRegistryFile(HWND hWnd)
Definition: framewnd.c:586
HWND hStatusBar
Definition: main.cpp:35
void ResizeWnd(int cx, int cy)
Definition: childwnd.c:41
enum OPTION_FLAGS Options
Definition: stats.c:44
WPARAM wParam
Definition: combotst.c:138
HFONT hFont
Definition: main.c:53
UINT_PTR WPARAM
Definition: windef.h:207
int InfoMessageBox(HWND hWnd, UINT uType, LPCWSTR lpTitle, LPCWSTR lpMessage,...)
Definition: error.c:51
void UpdateStatusBar(void)
Definition: solitaire.cpp:148
int nSplitPos
Definition: main.h:65
GLenum GLclampf GLint i
Definition: glfuncs.h:14
long LONG
Definition: pedump.c:60
#define NMTREEVIEW
Definition: commctrl.h:3609
WINDOWPLACEMENT pos
Definition: main.h:66
LONG_PTR LPARAM
Definition: windef.h:208
int ErrorMessageBox(HWND hWnd, LPCWSTR lpTitle, DWORD dwErrorCode,...)
Definition: error.c:24
BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath)
Definition: edit.c:1456
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
BOOL FindNext(HWND hWnd)
Definition: find.c:631
static HWND hwndParent
Definition: cryptui.c:300
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426
BOOL DeleteNode(HWND hwndTV, HTREEITEM hItem)
Definition: treeview.c:102
LPCWSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY *phRootKey)
Definition: treeview.c:83
BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result)
Definition: listview.c:543
HINSTANCE hInst
Definition: main.h:74
void ShowAboutBox(HWND hWnd)
Definition: about.c:25
void DestroyMainMenu(void)
Definition: main.c:156
void DestroyListView(HWND hwndLV)
Definition: listview.c:653
WCHAR szTitle[]
Definition: magnifier.c:36
unsigned int BOOL
Definition: ntddk_ex.h:94
HWND CreateListView(HWND hwndParent, HMENU id)
Definition: listview.c:630
HWND hWnd
Definition: main.h:78
HWND hWnd
Definition: main.h:59
#define MAX_PATH
Definition: compat.h:26
WCHAR szChildClass[]
Definition: main.c:40
unsigned int UINT
Definition: ndis.h:50
ChildWnd * g_pChildWnd
Definition: childwnd.c:23
unsigned long DWORD
Definition: ntddk_ex.h:95
HWND CreateTreeView(HWND hwndParent, LPWSTR pHostName, HMENU id)
Definition: treeview.c:634
BOOL RefreshListView(HWND hwndLV, HKEY hKey, LPCWSTR keyPath)
Definition: listview.c:670
HWND hAddressBtnWnd
Definition: main.h:63
HMENU hMenuFrame
Definition: main.c:32
LRESULT CALLBACK FrameWndProc(HWND, UINT, WPARAM, LPARAM)
Definition: framewnd.c:1304
void FindDialog(HWND hWnd)
Definition: find.c:813
HWND hFrameWnd
Definition: main.c:30
LPCWSTR GetValueName(HWND hwndLV, int iStartAt)
Definition: listview.c:55
LONG RenameKey(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpNewName)
Definition: edit.c:1489
HWND StartKeyRename(HWND hwndTV)
Definition: treeview.c:383
LPCWSTR szPath
Definition: env.c:35
HMENU hPopupMenus
Definition: main.c:33
BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCWSTR valueName, BOOL EditBin)
Definition: edit.c:1072
HTREEITEM InsertNode(HWND hwndTV, HTREEITEM hItem, LPWSTR name)
Definition: treeview.c:331
void LoadSettings(void)
Definition: settings.c:53
LPCWSTR get_root_key_name(HKEY hRootKey)
Definition: childwnd.c:29
OPTION_FLAGS
Definition: main.h:46
LPCWSTR getAppName(void)
Definition: regedit.c:61
BOOL CreateNewKey(HWND hwndTV, HTREEITEM hItem)
Definition: treeview.c:571
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
_Out_opt_ int * cx
Definition: commctrl.h:570
HWND hAddressBarWnd
Definition: main.h:62
Definition: main.h:57
Definition: name.c:36
WCHAR szFrameClass[]
Definition: main.c:39
TCHAR lpTitle[80]
Definition: ctm.c:67
BOOL SelectNode(HWND hwndTV, LPCWSTR keyPath)
Definition: treeview.c:665
void DestroyTreeView(HWND hwndTV)
Definition: treeview.c:654
BOOL RegKeyEditPermissions(HWND hWndOwner, HKEY hKey, LPCWSTR lpMachine, LPCWSTR lpKeyName)
Definition: security.c:839
BOOL CopyKeyName(HWND hWnd, HKEY hRootKey, LPCWSTR keyName)
Definition: framewnd.c:790
WCHAR * LPWSTR
Definition: xmlstorage.h:184
void SetupStatusBar(HWND hWnd, BOOL bResize)
Definition: framewnd.c:167
LONG_PTR LRESULT
Definition: windef.h:209
LONG QueryStringValue(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpValueName, LPWSTR pszBuffer, DWORD dwBufferLen)
Definition: edit.c:1554
BOOL RefreshTreeView(HWND hWndTV)
Definition: treeview.c:306
BOOL GetKeyName(LPWSTR pszDest, size_t iDestLength, HKEY hRootKey, LPCWSTR lpSubKey)
Definition: edit.c:1588
LONG RenameValue(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpDestValue, LPCWSTR lpSrcValue)
Definition: edit.c:1522
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
LPARAM lParam
Definition: combotst.c:139
BOOL OnTreeExpanding(HWND hWnd, NMTREEVIEW *pnmtv)
Definition: treeview.c:503
int nFocusPanel
Definition: main.h:64
BOOL RefreshTreeItem(HWND hwndTV, HTREEITEM hItem)
Definition: treeview.c:136