ReactOS 0.4.17-dev-1196-gb6224c3
main.h
Go to the documentation of this file.
1/*
2 * Regedit definitions
3 *
4 * Copyright (C) 2002 Robert Dickenson <robd@reactos.org>
5 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
6 */
7
8#pragma once
9
10#include "resource.h"
11
12
13#define STATUS_WINDOW 2001
14#define TREE_WINDOW 2002
15#define LIST_WINDOW 2003
16
17#define SPLIT_WIDTH 5
18#define SPLIT_MIN 30
19
20#define ARRAY_SIZE(A) (sizeof(A)/sizeof(*A))
21
22#define PM_MODIFYVALUE 0
23#define PM_NEW 1
24#define PM_TREECONTEXT 2
25#define PM_ROOTITEM 3
26#define PM_HEXEDIT 4
27
28#define MAX_NEW_KEY_LEN 128
29#define KEY_MAX_LEN 1024
30
31#define REG_FORMAT_5 1
32#define REG_FORMAT_4 2
33
34/******************************************************************************/
35
37{
45};
46
47typedef struct
48{
56 int nFocusPanel; /* 0: left 1: right */
60} ChildWnd;
61extern ChildWnd* g_pChildWnd;
62
63/*******************************************************************************
64 * Global Variables:
65 */
66extern HINSTANCE hInst;
67extern HWND hFrameWnd;
68extern HMENU hMenuFrame;
69extern HWND hStatusBar;
70extern HMENU hPopupMenus;
71extern HFONT hFont;
72extern enum OPTION_FLAGS Options;
73
74extern WCHAR szTitle[];
75extern WCHAR szFrameClass[];
76extern WCHAR szChildClass[];
77
78extern const WCHAR g_szGeneralRegKey[];
79extern const WCHAR* reg_class_namesW[];
80
81/* about.c */
83
84/* childwnd.c */
86void ResizeWnd(int cx, int cy);
88VOID UpdateAddress(HTREEITEM hItem, HKEY hRootKey, LPCWSTR pszPath, BOOL bSelectNone);
89
90/* edit.c */
91BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCWSTR valueName, BOOL EditBin);
92BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath);
93LONG RenameKey(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpNewName);
94LONG RenameValue(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpDestValue, LPCWSTR lpSrcValue);
95LONG QueryStringValue(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpValueName, LPWSTR pszBuffer, DWORD dwBufferLen);
96BOOL GetKeyName(LPWSTR pszDest, size_t iDestLength, HKEY hRootKey, LPCWSTR lpSubKey);
97
98/* error.c */
99int ErrorMessageBox(HWND hWnd, LPCWSTR lpTitle, DWORD dwErrorCode, ...);
100int InfoMessageBox(HWND hWnd, UINT uType, LPCWSTR lpTitle, LPCWSTR lpMessage, ...);
101
102/* find.c */
103void FindDialog(HWND hWnd);
106
107/* framewnd.c */
109void SetupStatusBar(HWND hWnd, BOOL bResize);
110void UpdateStatusBar(void);
111BOOL CopyKeyName(HWND hWnd, HKEY hRootKey, LPCWSTR keyName);
113
114/* listview.c */
116BOOL RefreshListView(HWND hwndLV, HKEY hKey, LPCWSTR keyPath, BOOL bSelectNone);
117WCHAR *GetValueName(HWND hwndLV, int iStartAt);
120BOOL IsDefaultValue(HWND hwndLV, int i);
121
122/* regedit.c */
123void WINAPIV output_message(unsigned int id, ...);
124void WINAPIV error_exit(unsigned int id, ...);
125
126/* regproc.c */
127char *GetMultiByteString(const WCHAR *strW);
129void delete_registry_key(WCHAR *reg_key_name);
131
132/* security.c */
133BOOL RegKeyEditPermissions(HWND hWndOwner, HKEY hKey, LPCWSTR lpMachine, LPCWSTR lpKeyName);
134
135/* settings.c */
136void LoadSettings(void);
137void SaveSettings(void);
138
139/* treeview.c */
144LPCWSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY* phRootKey);
147HWND StartKeyRename(HWND hwndTV);
149BOOL SelectNode(HWND hwndTV, LPCWSTR keyPath);
150void DestroyTreeView(HWND hwndTV);
151void DestroyListView(HWND hwndLV);
152void DestroyMainMenu(void);
153
154/* txtproc.c */
156
157/* EOF */
HWND hWnd
Definition: settings.c:17
BOOL CopyKeyName(HWND hWnd, HKEY hRootKey, LPCWSTR keyName)
Definition: framewnd.c:908
void SetupStatusBar(HWND hWnd, BOOL bResize)
Definition: framewnd.c:153
BOOL IsDefaultValue(HWND hwndLV, int i)
Definition: listview.c:95
HFONT hFont
Definition: main.c:53
BOOL DeleteNode(HWND hwndTV, HTREEITEM hItem)
Definition: treeview.c:99
HWND CreateTreeView(HWND hwndParent, LPWSTR pHostName, HMENU id)
Definition: treeview.c:741
BOOL import_registry_file(FILE *reg_file)
Definition: regproc.c:1066
void DestroyTreeView(HWND hwndTV)
Definition: treeview.c:763
BOOL RefreshTreeItem(HWND hwndTV, HTREEITEM hItem)
Definition: treeview.c:133
void FindNextMessageBox(HWND hWnd)
Definition: find.c:799
int InfoMessageBox(HWND hWnd, UINT uType, LPCWSTR lpTitle, LPCWSTR lpMessage,...)
Definition: error.c:38
enum OPTION_FLAGS Options
Definition: setupldr.c:241
BOOL OnTreeExpanding(HWND hWnd, NMTREEVIEW *pnmtv)
Definition: treeview.c:496
HMENU hPopupMenus
Definition: main.c:25
LRESULT CALLBACK FrameWndProc(HWND, UINT, WPARAM, LPARAM)
Definition: framewnd.c:1463
void DestroyMainMenu(void)
Definition: main.c:139
BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCWSTR valueName, BOOL EditBin)
Definition: edit.c:1522
BOOL SelectNode(HWND hwndTV, LPCWSTR keyPath)
Definition: treeview.c:774
BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath)
Definition: edit.c:1938
HINSTANCE hInst
Definition: dxdiag.c:13
WCHAR szFrameClass[]
Definition: main.c:31
int ErrorMessageBox(HWND hWnd, LPCWSTR lpTitle, DWORD dwErrorCode,...)
Definition: error.c:11
ChildWnd * g_pChildWnd
Definition: childwnd.c:15
BOOL RefreshListView(HWND hwndLV, HKEY hKey, LPCWSTR keyPath, BOOL bSelectNone)
Definition: listview.c:678
BOOL TreeWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result)
Definition: treeview.c:622
const WCHAR * reg_class_namesW[]
Definition: main.c:12
LPCWSTR get_root_key_name(HKEY hRootKey)
Definition: childwnd.c:78
HWND hFrameWnd
Definition: main.c:22
LPCWSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY *phRootKey)
Definition: treeview.c:73
const WCHAR g_szGeneralRegKey[]
Definition: settings.c:16
BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result)
Definition: listview.c:552
void SaveSettings(void)
Definition: settings.c:115
BOOL ExportRegistryFile(HWND hWnd)
Definition: framewnd.c:608
void UpdateStatusBar(void)
Definition: solitaire.cpp:150
HWND StartKeyRename(HWND hwndTV)
Definition: treeview.c:380
VOID UpdateAddress(HTREEITEM hItem, HKEY hRootKey, LPCWSTR pszPath, BOOL bSelectNone)
Definition: childwnd.c:328
HMENU hMenuFrame
Definition: main.c:24
void WINAPIV output_message(unsigned int id,...)
Definition: reg.c:92
HWND CreateListView(HWND hwndParent, HMENU id, INT cx)
Definition: listview.c:639
LONG RenameValue(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpDestValue, LPCWSTR lpSrcValue)
Definition: edit.c:2006
WCHAR szChildClass[]
Definition: main.c:32
BOOL RegKeyEditPermissions(HWND hWndOwner, HKEY hKey, LPCWSTR lpMachine, LPCWSTR lpKeyName)
Definition: security.c:793
void FindDialog(HWND hWnd)
Definition: find.c:811
HTREEITEM InsertNode(HWND hwndTV, HTREEITEM hItem, LPWSTR name)
Definition: treeview.c:328
LONG RenameKey(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpNewName)
Definition: edit.c:1971
char * GetMultiByteString(const WCHAR *strW)
Definition: regproc.c:73
BOOL FindNext(HWND hWnd)
Definition: find.c:609
void ShowAboutBox(HWND hWnd)
Definition: about.c:12
void WINAPIV error_exit(unsigned int id,...)
Definition: regedit.c:88
LONG QueryStringValue(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpValueName, LPWSTR pszBuffer, DWORD dwBufferLen)
Definition: edit.c:2038
WCHAR szTitle[]
Definition: magnifier.c:35
LRESULT CALLBACK ChildWndProc(HWND, UINT, WPARAM, LPARAM)
Definition: childwnd.c:394
BOOL RefreshTreeView(HWND hWndTV)
Definition: treeview.c:303
WCHAR * GetValueName(HWND hwndLV, int iStartAt)
Definition: listview.c:42
void LoadSettings(void)
Definition: settings.c:53
void DestroyListView(HWND hwndLV)
Definition: listview.c:662
BOOL GetKeyName(LPWSTR pszDest, size_t iDestLength, HKEY hRootKey, LPCWSTR lpSubKey)
Definition: edit.c:2072
HWND hStatusBar
Definition: main.c:23
BOOL export_registry_key(WCHAR *file_name, WCHAR *path, DWORD format)
Definition: regproc.c:1591
void delete_registry_key(WCHAR *reg_key_name)
Definition: regproc.c:1114
BOOL CreateNewKey(HWND hwndTV, HTREEITEM hItem)
Definition: treeview.c:563
BOOL txt_export_registry_key(LPCWSTR file_name, LPCWSTR path)
Definition: txtproc.c:401
void ResizeWnd(int cx, int cy)
Definition: childwnd.c:97
OPTION_FLAGS
Definition: main.h:37
@ OPTIONS_VIEW_DATA_ONLY
Definition: main.h:44
@ OPTIONS_DISPLAY_BINARY_DATA
Definition: main.h:42
@ OPTIONS_AUTO_REFRESH
Definition: main.h:38
@ OPTIONS_CONFIRM_ON_DELETE
Definition: main.h:40
@ OPTIONS_READ_ONLY_MODE
Definition: main.h:39
@ OPTIONS_VIEW_TREE_ONLY
Definition: main.h:43
@ OPTIONS_SAVE_ON_EXIT
Definition: main.h:41
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
static HWND hwndParent
Definition: cryptui.c:299
TCHAR lpTitle[80]
Definition: ctm.c:69
#define MAX_PATH
Definition: compat.h:34
#define CALLBACK
Definition: compat.h:35
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
FxAutoRegKey hKey
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int UINT
Definition: sysinfo.c:13
LONG_PTR LPARAM
Definition: minwindef.h:175
LONG_PTR LRESULT
Definition: minwindef.h:176
UINT_PTR WPARAM
Definition: minwindef.h:174
LPCWSTR szPath
Definition: env.c:37
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
static LPCWSTR file_name
Definition: protocol.c:152
WCHAR strW[12]
Definition: clipboard.c:2216
short WCHAR
Definition: pedump.c:58
long LONG
Definition: pedump.c:60
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
#define NMTREEVIEW
Definition: commctrl.h:3647
#define WINAPIV
Definition: sdbpapi.h:64
Definition: main.h:48
int nSplitPos
Definition: main.h:57
int nFocusPanel
Definition: main.h:56
WINDOWPLACEMENT pos
Definition: main.h:58
HWND hTreeWnd
Definition: main.h:50
HIMAGELIST hGoButtonHot
Definition: main.h:55
HIMAGELIST hGoButtonNormal
Definition: main.h:54
HWND hListWnd
Definition: main.h:51
HWND hAddressBarWnd
Definition: main.h:53
HWND hAddressToolBarWnd
Definition: main.h:52
HWND hWnd
Definition: main.h:49
Definition: name.c:39
const uint16_t * LPCWSTR
Definition: typedefs.h:57
uint16_t * LPWSTR
Definition: typedefs.h:56
int32_t INT
Definition: typedefs.h:58
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
_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:409