2003-08-07 03:10:13 +00:00
|
|
|
/*
|
|
|
|
* Regedit definitions
|
|
|
|
*
|
|
|
|
* Copyright (C) 2002 Robert Dickenson <robd@reactos.org>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 12:49:52 +00:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2003-08-07 03:10:13 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __MAIN_H__
|
|
|
|
#define __MAIN_H__
|
|
|
|
|
|
|
|
#include "resource.h"
|
|
|
|
|
|
|
|
|
|
|
|
#define STATUS_WINDOW 2001
|
|
|
|
#define TREE_WINDOW 2002
|
|
|
|
#define LIST_WINDOW 2003
|
|
|
|
|
2003-12-08 22:48:07 +00:00
|
|
|
#define SPLIT_WIDTH 5
|
2003-08-07 03:10:13 +00:00
|
|
|
|
2003-12-03 20:25:24 +00:00
|
|
|
#define COUNT_OF(a) (sizeof(a)/sizeof(a[0]))
|
2003-08-07 03:10:13 +00:00
|
|
|
|
2004-01-16 02:14:19 +00:00
|
|
|
#define PM_MODIFYVALUE 0
|
|
|
|
#define PM_NEW 1
|
|
|
|
|
2004-03-15 20:19:38 +00:00
|
|
|
#define MAX_NEW_KEY_LEN 128
|
|
|
|
|
2004-05-04 02:55:28 +00:00
|
|
|
#define WM_NOTIFY_REFLECT (WM_USER+1024)
|
|
|
|
|
2005-04-14 11:30:31 +00:00
|
|
|
/* HexEdit Class */
|
|
|
|
#define HEM_SETDATA (WM_USER+0)
|
|
|
|
#define HEM_GETDATA (WM_USER+1)
|
|
|
|
|
2003-12-12 04:08:59 +00:00
|
|
|
extern HINSTANCE hInst;
|
|
|
|
|
2003-08-07 03:10:13 +00:00
|
|
|
/******************************************************************************/
|
|
|
|
|
|
|
|
enum OPTION_FLAGS {
|
2003-12-08 22:48:07 +00:00
|
|
|
OPTIONS_AUTO_REFRESH = 0x01,
|
|
|
|
OPTIONS_READ_ONLY_MODE = 0x02,
|
|
|
|
OPTIONS_CONFIRM_ON_DELETE = 0x04,
|
|
|
|
OPTIONS_SAVE_ON_EXIT = 0x08,
|
2003-08-07 03:10:13 +00:00
|
|
|
OPTIONS_DISPLAY_BINARY_DATA = 0x10,
|
|
|
|
OPTIONS_VIEW_TREE_ONLY = 0x20,
|
|
|
|
OPTIONS_VIEW_DATA_ONLY = 0x40,
|
|
|
|
};
|
|
|
|
|
2005-10-26 12:07:55 +00:00
|
|
|
enum SEARCH_FLAGS {
|
|
|
|
SEARCH_WHOLE = 0x01,
|
|
|
|
SEARCH_KEYS = 0x02,
|
|
|
|
SEARCH_VALUES = 0x04,
|
|
|
|
SEARCH_CONTENT = 0x08,
|
|
|
|
};
|
|
|
|
|
2003-08-07 03:10:13 +00:00
|
|
|
typedef struct {
|
2003-12-08 22:48:07 +00:00
|
|
|
HWND hWnd;
|
2003-08-07 03:10:13 +00:00
|
|
|
HWND hTreeWnd;
|
|
|
|
HWND hListWnd;
|
|
|
|
int nFocusPanel; /* 0: left 1: right */
|
2003-12-08 22:48:07 +00:00
|
|
|
int nSplitPos;
|
|
|
|
WINDOWPLACEMENT pos;
|
2008-08-25 21:00:35 +00:00
|
|
|
WCHAR szPath[MAX_PATH];
|
2003-08-07 03:10:13 +00:00
|
|
|
} ChildWnd;
|
2003-12-12 04:08:59 +00:00
|
|
|
extern ChildWnd* g_pChildWnd;
|
2003-08-07 03:10:13 +00:00
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Global Variables:
|
|
|
|
*/
|
|
|
|
extern HINSTANCE hInst;
|
|
|
|
extern HWND hFrameWnd;
|
|
|
|
extern HMENU hMenuFrame;
|
|
|
|
extern HWND hStatusBar;
|
2004-01-16 02:14:19 +00:00
|
|
|
extern HMENU hPopupMenus;
|
2003-08-07 03:10:13 +00:00
|
|
|
extern HFONT hFont;
|
|
|
|
extern enum OPTION_FLAGS Options;
|
|
|
|
|
2011-04-16 08:06:48 +00:00
|
|
|
extern WCHAR szTitle[];
|
|
|
|
extern const WCHAR szFrameClass[];
|
|
|
|
extern const WCHAR szChildClass[];
|
2011-04-16 08:07:03 +00:00
|
|
|
extern const WCHAR szHexEditClass[];
|
2008-08-31 14:49:43 +00:00
|
|
|
extern WCHAR g_pszDefaultValueName[];
|
2003-08-07 03:10:13 +00:00
|
|
|
|
2008-08-10 11:52:44 +00:00
|
|
|
/* Registry class names and their indexes */
|
|
|
|
extern const WCHAR* reg_class_namesW[];
|
|
|
|
#define INDEX_HKEY_LOCAL_MACHINE 0
|
|
|
|
#define INDEX_HKEY_USERS 1
|
|
|
|
#define INDEX_HKEY_CLASSES_ROOT 2
|
|
|
|
#define INDEX_HKEY_CURRENT_CONFIG 3
|
|
|
|
#define INDEX_HKEY_CURRENT_USER 4
|
|
|
|
#define INDEX_HKEY_DYN_DATA 5
|
|
|
|
|
|
|
|
|
|
|
|
|
2003-08-07 03:10:13 +00:00
|
|
|
/* about.c */
|
|
|
|
extern void ShowAboutBox(HWND hWnd);
|
|
|
|
|
|
|
|
/* childwnd.c */
|
2008-08-30 22:57:41 +00:00
|
|
|
extern LPWSTR GetItemFullPath(HWND hwndTV, HTREEITEM hItem, BOOL bFull);
|
2003-08-07 03:10:13 +00:00
|
|
|
extern LRESULT CALLBACK ChildWndProc(HWND, UINT, WPARAM, LPARAM);
|
|
|
|
|
|
|
|
/* framewnd.c */
|
|
|
|
extern LRESULT CALLBACK FrameWndProc(HWND, UINT, WPARAM, LPARAM);
|
|
|
|
extern void SetupStatusBar(HWND hWnd, BOOL bResize);
|
|
|
|
extern void UpdateStatusBar(void);
|
|
|
|
|
|
|
|
/* listview.c */
|
2008-04-09 12:22:42 +00:00
|
|
|
extern HWND CreateListView(HWND hwndParent, UINT id);
|
2008-08-27 18:40:31 +00:00
|
|
|
extern BOOL RefreshListView(HWND hwndLV, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR highlightValue);
|
2004-03-15 20:19:38 +00:00
|
|
|
extern HWND StartValueRename(HWND hwndLV);
|
2008-08-31 14:58:27 +00:00
|
|
|
extern LPWSTR GetItemText(HWND hwndLV, UINT item);
|
2008-08-27 18:40:31 +00:00
|
|
|
extern LPCWSTR GetValueName(HWND hwndLV);
|
2004-03-12 19:44:47 +00:00
|
|
|
extern BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result);
|
|
|
|
extern BOOL IsDefaultValue(HWND hwndLV, int i);
|
2003-08-07 03:10:13 +00:00
|
|
|
|
|
|
|
/* treeview.c */
|
2008-08-25 21:00:35 +00:00
|
|
|
extern HWND CreateTreeView(HWND hwndParent, LPWSTR pHostName, UINT id);
|
2005-01-10 16:03:22 +00:00
|
|
|
extern BOOL RefreshTreeView(HWND hWndTV);
|
2011-04-16 08:07:03 +00:00
|
|
|
extern BOOL OnTreeExpanding(HWND hWnd, NMTREEVIEWW* pnmtv);
|
2008-08-30 22:57:41 +00:00
|
|
|
extern LPWSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY* phRootKey);
|
2004-03-15 20:19:38 +00:00
|
|
|
extern BOOL DeleteNode(HWND hwndTV, HTREEITEM hItem);
|
2008-08-21 21:49:34 +00:00
|
|
|
extern HTREEITEM InsertNode(HWND hwndTV, HTREEITEM hItem, LPWSTR name);
|
2004-03-15 20:19:38 +00:00
|
|
|
extern HWND StartKeyRename(HWND hwndTV);
|
2008-08-22 22:44:29 +00:00
|
|
|
extern HTREEITEM FindPathInTree(HWND hwndTV, LPCWSTR lpKeyName);
|
2008-08-25 20:21:58 +00:00
|
|
|
extern HTREEITEM FindNext(HWND hwndTV, HTREEITEM hItem, LPCWSTR sstring, int mode, int *row);
|
2003-08-07 03:10:13 +00:00
|
|
|
|
2003-12-03 20:25:24 +00:00
|
|
|
/* edit.c */
|
2008-08-21 21:49:34 +00:00
|
|
|
extern BOOL CreateKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPWSTR newKeyName);
|
2008-08-28 14:18:44 +00:00
|
|
|
extern BOOL CreateValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, DWORD valueType, LPWSTR valueName);
|
2008-08-29 19:37:43 +00:00
|
|
|
extern BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName);
|
2008-08-09 00:25:34 +00:00
|
|
|
extern BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath);
|
|
|
|
extern BOOL DeleteValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName, BOOL showMessageBox);
|
2008-08-29 20:20:26 +00:00
|
|
|
extern BOOL RenameValue(HWND hwnd, HKEY hRootKey, LPCWSTR keyPath, LPCWSTR oldName, LPCWSTR newName);
|
2008-08-30 21:50:24 +00:00
|
|
|
extern BOOL RenameKey(HWND hwnd, HKEY hRootKey, LPCWSTR keyPath, LPCWSTR newName);
|
2005-10-26 12:07:55 +00:00
|
|
|
extern void error(HWND hwnd, INT resId, ...);
|
2003-12-03 20:25:24 +00:00
|
|
|
|
2005-04-14 11:30:31 +00:00
|
|
|
/* hexedit.c */
|
|
|
|
extern void HexEdit_Register(void);
|
|
|
|
|
2003-08-07 03:10:13 +00:00
|
|
|
#endif /* __MAIN_H__ */
|