mirror of
https://github.com/reactos/reactos.git
synced 2024-10-01 06:57:08 +00:00
9facbf6b7f
0.4.15-dev-5985-g31fdaca8c0
[REGEDIT] Strip redundant include, minor formatting (#5264) 0.4.15-dev-5970-g9d7d3314b3
[REGEDIT] Check whether pszSelectKey is NULL on CDN_FILEOK (#5255) 0.4.15-dev-5898-g84e580b67e
[REGEDIT] Fix ListView selection and finding (#5150) (superseded) 0.4.15-dev-5802-gcce3eb9393
Fix buffer read past end problem. (#5146) CORE-15896 and CORE-18230 partially 0.4.15-dev-5753-g1ee9ea4518
[REGEDIT] Avoid buffer overflow in SelectNode. CORE-18602 (I left the wscpy-replacement at the end for the fixed size strings, as they would increase binary size, and are totally safe) partially 0.4.15-dev-5308-g5daf5cd057
[REGEDIT] Use shell icons for the tree view (#4841) CORE-10764 0.4.15-dev-4850-g568383c9b9
[REGEDIT] Fix issue at Find registry key (#4341) partially 0.4.15-dev-2265-gbebdfda8b7
[REGEDIT]... Use newer file open dialog (#3571) 0.4.15-dev-1470-g9de8787187
[REGEDIT] Display search finished messagebox when using Find Next (F3) menu item (#3371) CORE-17368 0.4.15-dev-1302-g6aae5f4fdd
[REGEDIT] Make "finished find" messagebox owned by Regedit window (#3369) CORE-17367 0.4.15-dev-169-g0461de33c5
[REGEDIT] Fix HeapFree() on the wrong variable (#2736) 0.4.14-dev-1484-gc832112771
[REGEDIT] Fix tree view popup menu issues CORE-16887 0.4.14-dev-1468-g763de230b2
[REGEDIT] Fix inconsistent menu state for 'Permissions' CORE-16889 a more efficient solution than 0.4.14-dev-1467-gb280615b85
[REGEDIT] Crash on selecting 'New' on root item 'My computer' CORE-16888 0.4.14-dev-1466-g13dd917589
[REGEDIT] CORE-16892 fr-FR Translation update 0.4.13-dev-464-g6b95727282
[REGEDIT] Adjust ListView column widths (#1663) CORE-15187 0.4.12-dev-47-g63a0ac0461
[REGEDIT] Set background brush to child window (#1122) CORE-15442 a few fragments only of 0.4.15-dev-5304-g36a7f0dc7c
[REGEDIT] framewnd.c resize_frame_rect(), main.h strip externs before func declarations and reordering, treeview.c InitTreeViewImageLists() also port back a few selected translation improvements, and strip the suggestions-feature in older branches <= 0.4.13 which does not exist in 2k3sp2.
153 lines
4.8 KiB
C
153 lines
4.8 KiB
C
/*
|
|
* 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
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "resource.h"
|
|
|
|
|
|
#define STATUS_WINDOW 2001
|
|
#define TREE_WINDOW 2002
|
|
#define LIST_WINDOW 2003
|
|
|
|
#define SPLIT_WIDTH 5
|
|
#define SPLIT_MIN 30
|
|
|
|
#define COUNT_OF(a) (sizeof(a)/sizeof(a[0]))
|
|
|
|
#define PM_MODIFYVALUE 0
|
|
#define PM_NEW 1
|
|
#define PM_TREECONTEXT 2
|
|
#define PM_HEXEDIT 3
|
|
|
|
#define MAX_NEW_KEY_LEN 128
|
|
|
|
/******************************************************************************/
|
|
|
|
enum OPTION_FLAGS
|
|
{
|
|
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,
|
|
};
|
|
|
|
typedef struct
|
|
{
|
|
HWND hWnd;
|
|
HWND hTreeWnd;
|
|
HWND hListWnd;
|
|
HWND hAddressBarWnd;
|
|
HWND hAddressBtnWnd;
|
|
int nFocusPanel; /* 0: left 1: right */
|
|
int nSplitPos;
|
|
WINDOWPLACEMENT pos;
|
|
WCHAR szPath[MAX_PATH];
|
|
} ChildWnd;
|
|
extern ChildWnd* g_pChildWnd;
|
|
|
|
/*******************************************************************************
|
|
* Global Variables:
|
|
*/
|
|
extern HINSTANCE hInst;
|
|
extern HWND hFrameWnd;
|
|
extern HMENU hMenuFrame;
|
|
extern HWND hStatusBar;
|
|
extern HMENU hPopupMenus;
|
|
extern HFONT hFont;
|
|
extern enum OPTION_FLAGS Options;
|
|
|
|
extern WCHAR szTitle[];
|
|
extern WCHAR szFrameClass[];
|
|
extern WCHAR szChildClass[];
|
|
|
|
extern const WCHAR g_szGeneralRegKey[];
|
|
|
|
/* about.c */
|
|
void ShowAboutBox(HWND hWnd);
|
|
|
|
/* childwnd.c */
|
|
LRESULT CALLBACK ChildWndProc(HWND, UINT, WPARAM, LPARAM);
|
|
void ResizeWnd(int cx, int cy);
|
|
LPCWSTR get_root_key_name(HKEY hRootKey);
|
|
VOID UpdateAddress(HTREEITEM hItem, HKEY hRootKey, LPCWSTR pszPath, BOOL bSelectNone);
|
|
|
|
/* edit.c */
|
|
BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCWSTR valueName, BOOL EditBin);
|
|
BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath);
|
|
LONG RenameKey(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpNewName);
|
|
LONG RenameValue(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpDestValue, LPCWSTR lpSrcValue);
|
|
LONG QueryStringValue(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpValueName, LPWSTR pszBuffer, DWORD dwBufferLen);
|
|
BOOL GetKeyName(LPWSTR pszDest, size_t iDestLength, HKEY hRootKey, LPCWSTR lpSubKey);
|
|
|
|
/* error.c */
|
|
int ErrorMessageBox(HWND hWnd, LPCWSTR lpTitle, DWORD dwErrorCode, ...);
|
|
int InfoMessageBox(HWND hWnd, UINT uType, LPCWSTR lpTitle, LPCWSTR lpMessage, ...);
|
|
|
|
/* find.c */
|
|
void FindDialog(HWND hWnd);
|
|
BOOL FindNext(HWND hWnd);
|
|
void FindNextMessageBox(HWND hWnd);
|
|
|
|
/* framewnd.c */
|
|
LRESULT CALLBACK FrameWndProc(HWND, UINT, WPARAM, LPARAM);
|
|
void SetupStatusBar(HWND hWnd, BOOL bResize);
|
|
void UpdateStatusBar(void);
|
|
BOOL CopyKeyName(HWND hWnd, HKEY hRootKey, LPCWSTR keyName);
|
|
BOOL ExportRegistryFile(HWND hWnd);
|
|
|
|
/* listview.c */
|
|
HWND CreateListView(HWND hwndParent, HMENU id, INT cx);
|
|
BOOL RefreshListView(HWND hwndLV, HKEY hKey, LPCWSTR keyPath, BOOL bSelectNone);
|
|
LPCWSTR GetValueName(HWND hwndLV, int iStartAt);
|
|
BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result);
|
|
BOOL TreeWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result);
|
|
BOOL IsDefaultValue(HWND hwndLV, int i);
|
|
|
|
/* regedit.c */
|
|
LPCWSTR getAppName(void);
|
|
|
|
/* security.c */
|
|
BOOL RegKeyEditPermissions(HWND hWndOwner, HKEY hKey, LPCWSTR lpMachine, LPCWSTR lpKeyName);
|
|
|
|
/* settings.c */
|
|
void LoadSettings(void);
|
|
void SaveSettings(void);
|
|
|
|
/* treeview.c */
|
|
HWND CreateTreeView(HWND hwndParent, LPWSTR pHostName, HMENU id);
|
|
BOOL RefreshTreeView(HWND hWndTV);
|
|
BOOL RefreshTreeItem(HWND hwndTV, HTREEITEM hItem);
|
|
BOOL OnTreeExpanding(HWND hWnd, NMTREEVIEW* pnmtv);
|
|
LPCWSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY* phRootKey);
|
|
BOOL DeleteNode(HWND hwndTV, HTREEITEM hItem);
|
|
HTREEITEM InsertNode(HWND hwndTV, HTREEITEM hItem, LPWSTR name);
|
|
HWND StartKeyRename(HWND hwndTV);
|
|
BOOL CreateNewKey(HWND hwndTV, HTREEITEM hItem);
|
|
BOOL SelectNode(HWND hwndTV, LPCWSTR keyPath);
|
|
void DestroyTreeView(HWND hwndTV);
|
|
void DestroyListView(HWND hwndLV);
|
|
void DestroyMainMenu(void);
|
|
|
|
/* EOF */
|