2003-08-22 05:55:14 +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
|
2009-10-27 10:34:16 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2003-08-22 05:55:14 +00:00
|
|
|
*/
|
|
|
|
|
2010-02-26 11:43:19 +00:00
|
|
|
#pragma once
|
2003-08-22 05:55:14 +00:00
|
|
|
|
|
|
|
#include "resource.h"
|
|
|
|
|
|
|
|
|
|
|
|
#define STATUS_WINDOW 2001
|
|
|
|
#define TREE_WINDOW 2002
|
|
|
|
#define LIST_WINDOW 2003
|
|
|
|
|
2004-01-01 15:12:11 +00:00
|
|
|
#define SPLIT_WIDTH 5
|
|
|
|
#define SPLIT_MIN 30
|
2003-08-22 05:55:14 +00:00
|
|
|
|
2004-01-01 15:12:11 +00:00
|
|
|
#define COUNT_OF(a) (sizeof(a)/sizeof(a[0]))
|
|
|
|
|
2004-01-01 17:47:48 +00:00
|
|
|
#define PM_MODIFYVALUE 0
|
|
|
|
#define PM_NEW 1
|
2005-09-16 20:13:26 +00:00
|
|
|
#define PM_TREECONTEXT 2
|
2010-07-28 19:13:24 +00:00
|
|
|
#define PM_HEXEDIT 3
|
2004-01-01 17:47:48 +00:00
|
|
|
|
2005-09-26 03:18:53 +00:00
|
|
|
#define MAX_NEW_KEY_LEN 128
|
|
|
|
|
2004-01-01 15:12:11 +00:00
|
|
|
extern HINSTANCE hInst;
|
2003-08-22 05:55:14 +00:00
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
|
2010-12-07 21:49:25 +00:00
|
|
|
enum OPTION_FLAGS
|
|
|
|
{
|
2012-10-03 22:42:34 +00:00
|
|
|
OPTIONS_AUTO_REFRESH = 0x01,
|
|
|
|
OPTIONS_READ_ONLY_MODE = 0x02,
|
|
|
|
OPTIONS_CONFIRM_ON_DELETE = 0x04,
|
|
|
|
OPTIONS_SAVE_ON_EXIT = 0x08,
|
|
|
|
OPTIONS_DISPLAY_BINARY_DATA = 0x10,
|
|
|
|
OPTIONS_VIEW_TREE_ONLY = 0x20,
|
|
|
|
OPTIONS_VIEW_DATA_ONLY = 0x40,
|
2003-08-22 05:55:14 +00:00
|
|
|
};
|
|
|
|
|
2010-12-07 21:49:25 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
2004-01-01 15:12:11 +00:00
|
|
|
HWND hWnd;
|
2003-08-22 05:55:14 +00:00
|
|
|
HWND hTreeWnd;
|
|
|
|
HWND hListWnd;
|
2010-12-07 21:49:25 +00:00
|
|
|
HWND hAddressBarWnd;
|
|
|
|
HWND hAddressBtnWnd;
|
2003-08-22 05:55:14 +00:00
|
|
|
int nFocusPanel; /* 0: left 1: right */
|
2012-10-03 22:42:34 +00:00
|
|
|
int nSplitPos;
|
2004-01-01 15:12:11 +00:00
|
|
|
WINDOWPLACEMENT pos;
|
2012-10-03 22:42:34 +00:00
|
|
|
WCHAR szPath[MAX_PATH];
|
2003-08-22 05:55:14 +00:00
|
|
|
} ChildWnd;
|
2004-01-01 15:12:11 +00:00
|
|
|
extern ChildWnd* g_pChildWnd;
|
2003-08-22 05:55:14 +00:00
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Global Variables:
|
|
|
|
*/
|
|
|
|
extern HINSTANCE hInst;
|
|
|
|
extern HWND hFrameWnd;
|
|
|
|
extern HMENU hMenuFrame;
|
|
|
|
extern HWND hStatusBar;
|
2004-01-01 17:47:48 +00:00
|
|
|
extern HMENU hPopupMenus;
|
2003-08-22 05:55:14 +00:00
|
|
|
extern HFONT hFont;
|
|
|
|
extern enum OPTION_FLAGS Options;
|
|
|
|
|
2012-10-03 22:42:34 +00:00
|
|
|
extern WCHAR szTitle[];
|
|
|
|
extern WCHAR szFrameClass[];
|
|
|
|
extern WCHAR szChildClass[];
|
2003-08-22 05:55:14 +00:00
|
|
|
|
2012-10-03 22:42:34 +00:00
|
|
|
extern const WCHAR g_szGeneralRegKey[];
|
2005-11-27 23:23:38 +00:00
|
|
|
|
2003-08-22 05:55:14 +00:00
|
|
|
/* about.c */
|
|
|
|
extern void ShowAboutBox(HWND hWnd);
|
|
|
|
|
|
|
|
/* childwnd.c */
|
2005-05-10 08:15:08 +00:00
|
|
|
extern LRESULT CALLBACK ChildWndProc(HWND, UINT, WPARAM, LPARAM);
|
2012-03-28 08:23:15 +00:00
|
|
|
extern void ResizeWnd(int cx, int cy);
|
2012-10-03 22:42:34 +00:00
|
|
|
extern LPCWSTR get_root_key_name(HKEY hRootKey);
|
2003-08-22 05:55:14 +00:00
|
|
|
|
2010-11-04 12:05:35 +00:00
|
|
|
/* error.c */
|
2012-10-03 22:42:34 +00:00
|
|
|
extern int ErrorMessageBox(HWND hWnd, LPCWSTR lpTitle, DWORD dwErrorCode, ...);
|
|
|
|
extern int InfoMessageBox(HWND hWnd, UINT uType, LPCWSTR lpTitle, LPCWSTR lpMessage, ...);
|
2010-11-04 12:05:35 +00:00
|
|
|
|
2005-11-27 23:23:38 +00:00
|
|
|
/* find.c */
|
|
|
|
extern void FindDialog(HWND hWnd);
|
|
|
|
extern BOOL FindNext(HWND hWnd);
|
|
|
|
|
2003-08-22 05:55:14 +00:00
|
|
|
/* framewnd.c */
|
2005-05-10 08:15:08 +00:00
|
|
|
extern LRESULT CALLBACK FrameWndProc(HWND, UINT, WPARAM, LPARAM);
|
2003-08-22 05:55:14 +00:00
|
|
|
extern void SetupStatusBar(HWND hWnd, BOOL bResize);
|
|
|
|
extern void UpdateStatusBar(void);
|
2012-10-03 22:42:34 +00:00
|
|
|
extern BOOL CopyKeyName(HWND hWnd, HKEY hRootKey, LPCWSTR keyName);
|
2005-11-22 04:54:18 +00:00
|
|
|
extern BOOL ExportRegistryFile(HWND hWnd);
|
2003-08-22 05:55:14 +00:00
|
|
|
|
|
|
|
/* listview.c */
|
2005-11-29 01:48:25 +00:00
|
|
|
extern HWND CreateListView(HWND hwndParent, HMENU id);
|
2012-10-03 22:42:34 +00:00
|
|
|
extern BOOL RefreshListView(HWND hwndLV, HKEY hKey, LPCWSTR keyPath);
|
|
|
|
extern LPCWSTR GetValueName(HWND hwndLV, int iStartAt);
|
2004-01-01 22:29:12 +00:00
|
|
|
extern BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result);
|
|
|
|
extern BOOL IsDefaultValue(HWND hwndLV, int i);
|
2003-08-22 05:55:14 +00:00
|
|
|
|
2012-10-03 22:42:34 +00:00
|
|
|
/* regedit.c */
|
|
|
|
LPCWSTR getAppName(void);
|
|
|
|
|
2003-08-22 05:55:14 +00:00
|
|
|
/* treeview.c */
|
2012-10-03 22:42:34 +00:00
|
|
|
extern HWND CreateTreeView(HWND hwndParent, LPWSTR pHostName, HMENU id);
|
2005-09-26 03:18:53 +00:00
|
|
|
extern BOOL RefreshTreeView(HWND hWndTV);
|
2005-11-22 01:30:30 +00:00
|
|
|
extern BOOL RefreshTreeItem(HWND hwndTV, HTREEITEM hItem);
|
2003-08-22 05:55:14 +00:00
|
|
|
extern BOOL OnTreeExpanding(HWND hWnd, NMTREEVIEW* pnmtv);
|
2012-10-03 22:42:34 +00:00
|
|
|
extern LPCWSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY* phRootKey);
|
2005-11-26 20:22:45 +00:00
|
|
|
extern BOOL DeleteNode(HWND hwndTV, HTREEITEM hItem);
|
2012-10-03 22:42:34 +00:00
|
|
|
extern HTREEITEM InsertNode(HWND hwndTV, HTREEITEM hItem, LPWSTR name);
|
2005-09-26 03:18:53 +00:00
|
|
|
extern HWND StartKeyRename(HWND hwndTV);
|
2005-09-22 20:54:20 +00:00
|
|
|
extern BOOL CreateNewKey(HWND hwndTV, HTREEITEM hItem);
|
2012-10-03 22:42:34 +00:00
|
|
|
extern BOOL SelectNode(HWND hwndTV, LPCWSTR keyPath);
|
2013-06-29 19:22:00 +00:00
|
|
|
extern void DestroyTreeView(HWND hwndTV);
|
|
|
|
extern void DestroyListView(HWND hwndLV);
|
|
|
|
extern void DestroyMainMenu(void);
|
2004-01-01 15:12:11 +00:00
|
|
|
|
|
|
|
/* edit.c */
|
2012-10-03 22:42:34 +00:00
|
|
|
extern BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCWSTR valueName, BOOL EditBin);
|
|
|
|
extern BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath);
|
|
|
|
extern LONG RenameKey(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpNewName);
|
|
|
|
extern LONG RenameValue(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpDestValue, LPCWSTR lpSrcValue);
|
|
|
|
extern LONG QueryStringValue(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpValueName, LPWSTR pszBuffer, DWORD dwBufferLen);
|
|
|
|
extern BOOL GetKeyName(LPWSTR pszDest, size_t iDestLength, HKEY hRootKey, LPCWSTR lpSubKey);
|
2010-09-29 21:43:39 +00:00
|
|
|
|
|
|
|
/* security.c */
|
2012-10-03 22:42:34 +00:00
|
|
|
extern BOOL RegKeyEditPermissions(HWND hWndOwner, HKEY hKey, LPCWSTR lpMachine, LPCWSTR lpKeyName);
|
2012-03-28 08:23:15 +00:00
|
|
|
|
|
|
|
/* settings.c */
|
|
|
|
extern void LoadSettings(void);
|
|
|
|
extern void SaveSettings(void);
|
2012-10-03 22:42:34 +00:00
|
|
|
|
|
|
|
/* EOF */
|