ReactOS 0.4.16-dev-1007-g2e85425
childwnd.c
Go to the documentation of this file.
1/*
2 * Regedit child window
3 *
4 * Copyright (C) 2002 Robert Dickenson <robd@reactos.org>
5 * Copyright (C) 2024 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
6 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
7 */
8
9#include "regedit.h"
10#include <shldisp.h>
11#include <shlguid.h>
12
14static int last_split = -1;
18
20{
21 if (ppv)
22 *ppv = NULL;
24 {
25 *ppv = This;
26 return S_OK;
27 }
28 return E_NOINTERFACE;
29}
30
32{
33 return 1;
34}
35
36static HRESULT WINAPI DummyEnumStringsNext(LPVOID This, ULONG celt, LPWSTR *parr, ULONG *pceltFetched)
37{
38 if (pceltFetched)
39 *pceltFetched = 0;
40 return S_FALSE;
41}
42
44{
45 return S_OK;
46}
47
49{
50 return S_OK;
51}
52
54{
55 return E_NOTIMPL;
56}
57
68};
69
74};
75
77{
78 if (hRootKey == HKEY_CLASSES_ROOT) return L"HKEY_CLASSES_ROOT";
79 if (hRootKey == HKEY_CURRENT_USER) return L"HKEY_CURRENT_USER";
80 if (hRootKey == HKEY_LOCAL_MACHINE) return L"HKEY_LOCAL_MACHINE";
81 if (hRootKey == HKEY_USERS) return L"HKEY_USERS";
82 if (hRootKey == HKEY_CURRENT_CONFIG) return L"HKEY_CURRENT_CONFIG";
83 if (hRootKey == HKEY_DYN_DATA) return L"HKEY_DYN_DATA";
84
85 return L"UNKNOWN HKEY, PLEASE REPORT";
86}
87
89{
90 RECT rc;
91 GetClientRect(hWnd, &rc);
92 return min(max(x, SPLIT_MIN), rc.right - SPLIT_MIN);
93}
94
95extern void ResizeWnd(int cx, int cy)
96{
97 HDWP hdwp = BeginDeferWindowPos(4);
98 RECT rt, rs, rb;
99 const int nButtonWidth = 44;
100 const int nButtonHeight = 22;
101 int cyEdge = GetSystemMetrics(SM_CYEDGE);
103
104 cy = 0;
106 {
108 cy = rs.bottom - rs.top;
109 }
110
112
115
117
119 if (hdwp)
121 rt.left, rt.top,
122 rt.right - rt.left - nButtonWidth, nButtonHeight,
123 uFlags);
124 if (hdwp)
126 rt.right - nButtonWidth, rt.top,
127 nButtonWidth, nButtonHeight,
128 uFlags);
129 if (hdwp)
131 rt.left,
132 rt.top + nButtonHeight + cyEdge,
134 rt.bottom - rt.top - cy - 2 * cyEdge,
135 uFlags);
136 if (hdwp)
138 rt.left + cx,
139 rt.top + nButtonHeight + cyEdge,
140 rt.right - cx,
141 rt.bottom - rt.top - cy - 2 * cyEdge,
142 uFlags);
143 if (hdwp)
144 EndDeferWindowPos(hdwp);
145}
146
147/*******************************************************************************
148 * Local module support methods
149 */
150
151static void draw_splitbar(HWND hWnd, int x)
152{
153 RECT rt;
154 HGDIOBJ OldObj;
156
157 if(!SizingPattern)
158 {
159 const DWORD Pattern[4] = {0x5555AAAA, 0x5555AAAA, 0x5555AAAA, 0x5555AAAA};
160 SizingPattern = CreateBitmap(8, 8, 1, 1, Pattern);
161 }
162 if(!SizingBrush)
163 {
165 }
166
168 MapWindowPoints(NULL, hWnd, (POINT *)&rt, sizeof(rt) / sizeof(POINT));
169
170 rt.left = x - SPLIT_WIDTH/2;
171 rt.right = x + SPLIT_WIDTH/2+1;
172 OldObj = SelectObject(hdc, SizingBrush);
173 PatBlt(hdc, rt.left, rt.top, rt.right - rt.left, rt.bottom - rt.top, PATINVERT);
174 SelectObject(hdc, OldObj);
176}
177
181static void finish_splitbar(HWND hWnd, int x)
182{
183 RECT rt;
184
186 last_split = -1;
187 GetClientRect(hWnd, &rt);
189 ResizeWnd(rt.right, rt.bottom);
190 InvalidateRect(hWnd, &rt, FALSE); // HACK: See CORE-19576
192}
193
194/*******************************************************************************
195 *
196 * Key suggestion
197 */
198
199#define MIN(a,b) ((a < b) ? (a) : (b))
200
201static void SuggestKeys(HKEY hRootKey, LPCWSTR pszKeyPath, LPWSTR pszSuggestions,
202 size_t iSuggestionsLength)
203{
204 WCHAR szBuffer[256];
205 WCHAR szLastFound[256];
206 size_t i;
207 HKEY hOtherKey, hSubKey;
208 BOOL bFound;
210
211 memset(pszSuggestions, 0, iSuggestionsLength * sizeof(*pszSuggestions));
212 iSuggestionsLength--;
213
214 /* Are we a root key in HKEY_CLASSES_ROOT? */
215 if ((hRootKey == HKEY_CLASSES_ROOT) && pszKeyPath[0] && !wcschr(pszKeyPath, L'\\'))
216 {
217 do
218 {
219 bFound = FALSE;
220
221 /* Check default key */
222 if (QueryStringValue(hRootKey, pszKeyPath, NULL,
223 szBuffer, ARRAY_SIZE(szBuffer)) == ERROR_SUCCESS)
224 {
225 /* Sanity check this key; it cannot be empty, nor can it be a
226 * loop back */
227 if ((szBuffer[0] != L'\0') && _wcsicmp(szBuffer, pszKeyPath))
228 {
229 if (RegOpenKeyExW(hRootKey, szBuffer, 0, regsam, &hOtherKey) == ERROR_SUCCESS)
230 {
231 lstrcpynW(pszSuggestions, L"HKCR\\", (int) iSuggestionsLength);
232 i = wcslen(pszSuggestions);
233 pszSuggestions += i;
234 iSuggestionsLength -= i;
235
236 lstrcpynW(pszSuggestions, szBuffer, (int) iSuggestionsLength);
237 i = MIN(wcslen(pszSuggestions) + 1, iSuggestionsLength);
238 pszSuggestions += i;
239 iSuggestionsLength -= i;
240 RegCloseKey(hOtherKey);
241
242 bFound = TRUE;
243 StringCbCopyW(szLastFound, sizeof(szLastFound), szBuffer);
244 pszKeyPath = szLastFound;
245 }
246 }
247 }
248 }
249 while(bFound && (iSuggestionsLength > 0));
250
251 /* Check CLSID key */
252 if (RegOpenKeyExW(hRootKey, pszKeyPath, 0, regsam, &hSubKey) == ERROR_SUCCESS)
253 {
254 if (QueryStringValue(hSubKey, L"CLSID", NULL, szBuffer,
255 ARRAY_SIZE(szBuffer)) == ERROR_SUCCESS)
256 {
257 lstrcpynW(pszSuggestions, L"HKCR\\CLSID\\", (int)iSuggestionsLength);
258 i = wcslen(pszSuggestions);
259 pszSuggestions += i;
260 iSuggestionsLength -= i;
261
262 lstrcpynW(pszSuggestions, szBuffer, (int)iSuggestionsLength);
263 i = MIN(wcslen(pszSuggestions) + 1, iSuggestionsLength);
264 pszSuggestions += i;
265 iSuggestionsLength -= i;
266 }
267 RegCloseKey(hSubKey);
268 }
269 }
270 else if ((hRootKey == HKEY_CURRENT_USER || hRootKey == HKEY_LOCAL_MACHINE) && *pszKeyPath)
271 {
272 LPCWSTR rootstr = hRootKey == HKEY_CURRENT_USER ? L"HKLM" : L"HKCU";
273 hOtherKey = hRootKey == HKEY_CURRENT_USER ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
274 if (RegOpenKeyExW(hOtherKey, pszKeyPath, 0, regsam, &hSubKey) == ERROR_SUCCESS)
275 {
276 int cch;
277 RegCloseKey(hSubKey);
278 cch = _snwprintf(pszSuggestions, iSuggestionsLength, L"%s\\%s", rootstr, pszKeyPath);
279 if (cch <= 0 || cch > iSuggestionsLength)
280 pszSuggestions[0] = UNICODE_NULL;
281 }
282 }
283}
284
286{
287 WNDPROC oldwndproc;
288 static WCHAR s_szNode[256];
290
291 switch (uMsg)
292 {
293 case WM_KEYUP:
294 if (wParam == VK_RETURN)
295 {
296 GetWindowTextW(hwnd, s_szNode, ARRAY_SIZE(s_szNode));
297 SelectNode(g_pChildWnd->hTreeWnd, s_szNode);
298 }
299 break;
300 default:
301 break;
302 }
303 return CallWindowProcW(oldwndproc, hwnd, uMsg, wParam, lParam);
304}
305
306VOID
307UpdateAddress(HTREEITEM hItem, HKEY hRootKey, LPCWSTR pszPath, BOOL bSelectNone)
308{
309 LPCWSTR keyPath, rootName;
310 LPWSTR fullPath;
311 DWORD cbFullPath;
312
313 /* Wipe the listview, the status bar and the address bar if the root key was selected */
315 {
319 return;
320 }
321
322 if (pszPath == NULL)
323 keyPath = GetItemPath(g_pChildWnd->hTreeWnd, hItem, &hRootKey);
324 else
325 keyPath = pszPath;
326
327 if (keyPath)
328 {
329 RefreshListView(g_pChildWnd->hListWnd, hRootKey, keyPath, bSelectNone);
330 rootName = get_root_key_name(hRootKey);
331 cbFullPath = (wcslen(rootName) + 1 + wcslen(keyPath) + 1) * sizeof(WCHAR);
332 fullPath = malloc(cbFullPath);
333 if (fullPath)
334 {
335 /* set (correct) the address bar text */
336 if (keyPath[0] != UNICODE_NULL)
337 StringCbPrintfW(fullPath, cbFullPath, L"%s%s%s", rootName,
338 ((keyPath[0] == L'\\') ? L"" : L"\\"), keyPath);
339 else
340 StringCbCopyW(fullPath, cbFullPath, rootName);
341
344 free(fullPath);
345
346 /* disable hive manipulation items temporarily (enable only if necessary) */
349 /* compare the strings to see if we should enable/disable the "Load Hive" menus accordingly */
350 if (_wcsicmp(rootName, L"HKEY_LOCAL_MACHINE") == 0 ||
351 _wcsicmp(rootName, L"HKEY_USERS") == 0)
352 {
353 /*
354 * enable the unload menu item if at the root, otherwise
355 * enable the load menu item if there is no slash in
356 * keyPath (ie. immediate child selected)
357 */
358 if (keyPath[0] == UNICODE_NULL)
360 else if (!wcschr(keyPath, L'\\'))
362 }
363 }
364 }
365}
366
374{
375 BOOL Result;
376 RECT rc;
377
378 switch (message)
379 {
380 case WM_CREATE:
381 {
382 WNDPROC oldproc;
383 HFONT hFont;
385 DWORD style;
386 IAutoComplete *pAutoComplete;
387
388 /* Load "My Computer" string */
390
392 if (!g_pChildWnd) return 0;
393
395 g_pChildWnd->nSplitPos = 190;
397
398 /* ES_AUTOHSCROLL style enables horizontal scrolling and shrinking */
402 hWnd, (HMENU)0, hInst, 0);
403
406 g_pChildWnd->hAddressBtnWnd = CreateWindowExW(0, L"Button", L"\x00BB", style,
408 hWnd, (HMENU)0, hInst, 0);
410 IMAGE_ICON, 12, 12, 0);
412
413 if (SUCCEEDED(CoCreateInstance(&CLSID_AutoComplete, NULL, CLSCTX_INPROC_SERVER, &IID_IAutoComplete, (void**)&pAutoComplete)))
414 {
415 IAutoComplete_Init(pAutoComplete, g_pChildWnd->hAddressBarWnd, (IUnknown*)&g_DummyEnumStrings, NULL, NULL);
416 IAutoComplete_Release(pAutoComplete);
417 }
418
419 GetClientRect(hWnd, &rc);
423
424 /* set the address bar and button font */
426 {
430 (WPARAM)hFont,
431 0);
434 (WPARAM)hFont,
435 0);
436 }
437 /* Subclass the AddressBar */
441 break;
442 }
443 case WM_COMMAND:
444 if(HIWORD(wParam) == BN_CLICKED)
445 {
447 }
448 break; //goto def;
449 case WM_SETCURSOR:
450 if (LOWORD(lParam) == HTCLIENT)
451 {
452 POINT pt;
456 {
458 return TRUE;
459 }
460 }
461 goto def;
462
463 case WM_DESTROY:
471 break;
472
473 case WM_LBUTTONDOWN:
474 {
475 INT x = (SHORT)LOWORD(lParam);
476 if (x >= g_pChildWnd->nSplitPos - SPLIT_WIDTH / 2 &&
477 x < g_pChildWnd->nSplitPos + SPLIT_WIDTH / 2 + 1)
478 {
481 last_split = x;
483 }
484 break;
485 }
486
487 case WM_LBUTTONUP:
488 case WM_RBUTTONDOWN:
489 if (GetCapture() == hWnd)
490 {
491 INT x = (SHORT)LOWORD(lParam);
494 }
495 break;
496
498 if (GetCapture() == hWnd && last_split >= 0)
500 break;
501
502 case WM_KEYDOWN:
503 if (wParam == VK_ESCAPE)
504 if (GetCapture() == hWnd)
505 {
506 RECT rt;
508 GetClientRect(hWnd, &rt);
509 ResizeWnd(rt.right, rt.bottom);
510 last_split = -1;
513 }
514 break;
515
516 case WM_MOUSEMOVE:
517 if (GetCapture() == hWnd)
518 {
519 INT x = (SHORT)LOWORD(lParam);
521 if (last_split != x)
522 {
524 last_split = x;
526 }
527 }
528 break;
529
530 case WM_SETFOCUS:
531 if (g_pChildWnd != NULL)
532 {
534 }
535 break;
536
537 case WM_NOTIFY:
538 if (g_pChildWnd == NULL) break;
539
540 if (((LPNMHDR)lParam)->idFrom == TREE_WINDOW)
541 {
543 {
544 goto def;
545 }
546
547 return Result;
548 }
549 else
550 {
551 if (((LPNMHDR)lParam)->idFrom == LIST_WINDOW)
552 {
554 {
555 goto def;
556 }
557
558 return Result;
559 }
560 else
561 {
562 goto def;
563 }
564 }
565 break;
566
567 case WM_CONTEXTMENU:
568 {
569 POINT pt;
571 {
572 int i, cnt;
573 BOOL IsDefault;
574 pt.x = (short) LOWORD(lParam);
575 pt.y = (short) HIWORD(lParam);
578 if (pt.x == -1 && pt.y == -1)
579 {
580 RECT rc;
581 if (i != -1)
582 {
583 rc.left = LVIR_BOUNDS;
585 pt.x = rc.left + 8;
586 pt.y = rc.top + 8;
587 }
588 else
589 pt.x = pt.y = 0;
591 }
592 if(i == -1)
593 {
595 }
596 else
597 {
600 IsDefault = IsDefaultValue(g_pChildWnd->hListWnd, i);
601 if(cnt == 1)
603 else
607
609 }
610 }
611 else if ((HWND)wParam == g_pChildWnd->hTreeWnd)
612 {
613 TVHITTESTINFO hti;
614 HMENU hContextMenu;
616 MENUITEMINFOW mii;
617 WCHAR resource[256];
618 WCHAR buffer[256];
619 LPWSTR s;
620 LPCWSTR keyPath;
621 HKEY hRootKey;
622 int iLastPos;
623 WORD wID;
624 BOOL isRoot;
625
626 pt.x = (short) LOWORD(lParam);
627 pt.y = (short) HIWORD(lParam);
628
629 if (pt.x == -1 && pt.y == -1)
630 {
631 RECT rc;
633 if (hti.hItem != NULL)
634 {
636 pt.x = rc.left + 8;
637 pt.y = rc.top + 8;
639 hti.flags = TVHT_ONITEM;
640 }
641 else
642 hti.flags = 0;
643 }
644 else
645 {
646 hti.pt.x = pt.x;
647 hti.pt.y = pt.y;
650 }
651
652 if (hti.flags & TVHT_ONITEM)
653 {
655
656 isRoot = (TreeView_GetParent(g_pChildWnd->hTreeWnd, hti.hItem) == NULL);
657 hContextMenu = GetSubMenu(hPopupMenus, isRoot ? PM_ROOTITEM : PM_TREECONTEXT);
658
659 memset(&item, 0, sizeof(item));
661 item.hItem = hti.hItem;
663
664 /* Set the Expand/Collapse menu item appropriately */
666 memset(&mii, 0, sizeof(mii));
667 mii.cbSize = sizeof(mii);
669 mii.fState = (item.cChildren > 0) ? MFS_DEFAULT : MFS_GRAYED;
671 mii.dwTypeData = (LPWSTR) buffer;
672 SetMenuItemInfo(hContextMenu, 0, TRUE, &mii);
673
674 if (isRoot == FALSE)
675 {
676 /* Remove any existing suggestions */
677 memset(&mii, 0, sizeof(mii));
678 mii.cbSize = sizeof(mii);
679 mii.fMask = MIIM_ID;
680 GetMenuItemInfo(hContextMenu, GetMenuItemCount(hContextMenu) - 1, TRUE, &mii);
681 if ((mii.wID >= ID_TREE_SUGGESTION_MIN) && (mii.wID <= ID_TREE_SUGGESTION_MAX))
682 {
683 do
684 {
685 iLastPos = GetMenuItemCount(hContextMenu) - 1;
686 GetMenuItemInfo(hContextMenu, iLastPos, TRUE, &mii);
687 RemoveMenu(hContextMenu, iLastPos, MF_BYPOSITION);
688 }
689 while((mii.wID >= ID_TREE_SUGGESTION_MIN) && (mii.wID <= ID_TREE_SUGGESTION_MAX));
690 }
691
692 /* Come up with suggestions */
693 keyPath = GetItemPath(g_pChildWnd->hTreeWnd, NULL, &hRootKey);
694 SuggestKeys(hRootKey, keyPath, Suggestions, ARRAY_SIZE(Suggestions));
695 if (Suggestions[0])
696 {
697 AppendMenu(hContextMenu, MF_SEPARATOR, 0, NULL);
698
700
701 s = Suggestions;
703 while(*s && (wID <= ID_TREE_SUGGESTION_MAX))
704 {
705 WCHAR *path = s, buf[MAX_PATH];
706 if (hRootKey == HKEY_CURRENT_USER || hRootKey == HKEY_LOCAL_MACHINE)
707 {
708 // Windows 10 only displays the root name
710 if (next > s)
711 lstrcpynW(path = buf, s, min(next - s, _countof(buf)));
712 }
714
715 memset(&mii, 0, sizeof(mii));
716 mii.cbSize = sizeof(mii);
717 mii.fMask = MIIM_STRING | MIIM_ID;
718 mii.wID = wID++;
719 mii.dwTypeData = buffer;
720 InsertMenuItem(hContextMenu, GetMenuItemCount(hContextMenu), TRUE, &mii);
721
722 s += wcslen(s) + 1;
723 }
724 }
725 }
726 TrackPopupMenu(hContextMenu, TPM_RIGHTBUTTON, pt.x, pt.y, 0, hFrameWnd, NULL);
727 }
728 }
729 break;
730 }
731
732 case WM_SIZE:
734 {
736 }
737 break;
738
739 default:
740def:
742 }
743 return 0;
744}
Arabic default style
Definition: afstyles.h:94
LONG QueryStringValue(HKEY hKey, LPCTSTR lpSubKey, LPCTSTR lpValueName, LPTSTR pszBuffer, DWORD dwBufferLen)
Definition: settings.c:19
HWND hWnd
Definition: settings.c:17
BOOL CreateListView(PMAIN_WND_INFO Info)
Definition: listview.c:355
static void finish_splitbar(HWND hWnd, int x)
Definition: childwnd.c:181
static int last_split
Definition: childwnd.c:14
static void draw_splitbar(HWND hWnd, int x)
Definition: childwnd.c:151
LRESULT CALLBACK AddressBarProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: childwnd.c:285
HBRUSH SizingBrush
Definition: childwnd.c:16
LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: childwnd.c:373
static ULONG WINAPI DummyEnumStringsAddRefRelease(LPVOID This)
Definition: childwnd.c:31
#define MIN(a, b)
Definition: childwnd.c:199
struct DummyEnumStrings g_DummyEnumStrings
ChildWnd * g_pChildWnd
Definition: childwnd.c:13
static HRESULT WINAPI DummyEnumStringsQI(LPVOID This, REFIID riid, void **ppv)
Definition: childwnd.c:19
static INT ClampSplitBarX(HWND hWnd, INT x)
Definition: childwnd.c:88
static HRESULT WINAPI DummyEnumStringsNext(LPVOID This, ULONG celt, LPWSTR *parr, ULONG *pceltFetched)
Definition: childwnd.c:36
LPCWSTR get_root_key_name(HKEY hRootKey)
Definition: childwnd.c:76
static HRESULT WINAPI DummyEnumStringsReset(LPVOID This)
Definition: childwnd.c:48
static HRESULT WINAPI DummyEnumStringsClone(LPVOID This, void **ppv)
Definition: childwnd.c:53
HBITMAP SizingPattern
Definition: childwnd.c:15
struct DummyEnumStringsVtbl g_DummyEnumStringsVtbl
WCHAR Suggestions[256]
Definition: childwnd.c:17
VOID UpdateAddress(HTREEITEM hItem, HKEY hRootKey, LPCWSTR pszPath, BOOL bSelectNone)
Definition: childwnd.c:307
static void SuggestKeys(HKEY hRootKey, LPCWSTR pszKeyPath, LPWSTR pszSuggestions, size_t iSuggestionsLength)
Definition: childwnd.c:201
static HRESULT WINAPI DummyEnumStringsSkip(LPVOID This, ULONG celt)
Definition: childwnd.c:43
void ResizeWnd(int cx, int cy)
Definition: childwnd.c:95
BOOL IsDefaultValue(HWND hwndLV, int i)
Definition: listview.c:95
BOOL RefreshListView(HWND hwndLV, HKEY hKey, LPCWSTR keyPath, BOOL bSelectNone)
Definition: listview.c:657
BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result)
Definition: listview.c:531
void DestroyListView(HWND hwndLV)
Definition: listview.c:641
HMENU hPopupMenus
Definition: main.c:25
HWND hFrameWnd
Definition: main.c:22
void DestroyMainMenu()
Definition: main.c:139
HMENU hMenuFrame
Definition: main.c:24
HWND hStatusBar
Definition: main.c:23
HFONT hFont
Definition: main.c:53
HWND CreateTreeView(HWND hwndParent, LPWSTR pHostName, HMENU id)
Definition: treeview.c:741
#define PM_TREECONTEXT
Definition: main.h:24
BOOL SelectNode(HWND hwndTV, LPCWSTR keyPath)
Definition: treeview.c:774
#define ARRAY_SIZE(A)
Definition: main.h:20
#define LIST_WINDOW
Definition: main.h:15
#define SPLIT_MIN
Definition: main.h:18
BOOL TreeWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result)
Definition: treeview.c:622
#define TREE_WINDOW
Definition: main.h:14
#define PM_NEW
Definition: main.h:23
LPCWSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY *phRootKey)
Definition: treeview.c:73
#define PM_ROOTITEM
Definition: main.h:25
#define PM_MODIFYVALUE
Definition: main.h:22
#define ID_TREE_SUGGESTION_MIN
Definition: resource.h:109
#define IDS_MY_COMPUTER
Definition: resource.h:82
#define IDS_COLLAPSE
Definition: resource.h:144
#define IDI_ARROW
Definition: resource.h:24
#define ID_EDIT_MODIFY
Definition: resource.h:48
#define ID_REGISTRY_UNLOADHIVE
Definition: resource.h:65
#define ID_TREE_EXPANDBRANCH
Definition: resource.h:62
#define ID_TREE_COLLAPSEBRANCH
Definition: resource.h:63
#define IDS_GOTO_SUGGESTED_KEY
Definition: resource.h:147
#define ID_EDIT_MODIFY_BIN
Definition: resource.h:75
#define IDS_EXPAND
Definition: resource.h:143
#define ID_TREE_SUGGESTION_MAX
Definition: resource.h:110
#define ID_EDIT_RENAME
Definition: resource.h:44
#define ID_REGISTRY_LOADHIVE
Definition: resource.h:64
const GUID IID_IUnknown
#define RegCloseKey(hKey)
Definition: registry.h:49
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
wcsncpy
#define E_NOTIMPL
Definition: ddrawi.h:99
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
UINT uFlags
Definition: api.c:59
#define wcschr
Definition: compat.h:17
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define MAX_PATH
Definition: compat.h:34
#define HeapFree(x, y, z)
Definition: compat.h:735
#define CALLBACK
Definition: compat.h:35
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
#define lstrcpynW
Definition: compat.h:738
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
LPWSTR WINAPI PathFindNextComponentW(LPCWSTR lpszPath)
Definition: path.c:2585
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
Definition: typeof.h:94
#define pt(x, y)
Definition: drawing.c:79
HINSTANCE hInst
Definition: dxdiag.c:13
#define SPLIT_WIDTH
Definition: eventvwr.c:45
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLdouble s
Definition: gl.h:2039
GLuint buffer
Definition: glext.h:5915
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
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
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
int _snwprintf(wchar_t *buffer, size_t count, const wchar_t *format,...)
HDC hdc
Definition: main.c:9
static HBITMAP
Definition: button.c:44
static HDC
Definition: imagelist.c:88
static HICON
Definition: imagelist.c:80
static DWORD DWORD void LPSTR DWORD cch
Definition: str.c:202
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
static ATOM item
Definition: dde.c:856
#define min(a, b)
Definition: monoChain.cc:55
unsigned int UINT
Definition: ndis.h:50
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
#define KEY_ENUMERATE_SUB_KEYS
Definition: nt_native.h:1019
#define UNICODE_NULL
#define L(x)
Definition: ntvdm.h:50
const GUID IID_IEnumString
#define LOWORD(l)
Definition: pedump.c:82
#define WS_CHILD
Definition: pedump.c:617
#define WS_TABSTOP
Definition: pedump.c:634
#define ES_AUTOHSCROLL
Definition: pedump.c:672
#define WS_VISIBLE
Definition: pedump.c:620
short SHORT
Definition: pedump.c:59
#define BS_DEFPUSHBUTTON
Definition: pedump.c:652
static VOID DestroyTreeView(HWND hTreeView)
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
#define TreeView_SelectItem(hwnd, hitem)
Definition: commctrl.h:3486
#define TVHT_ONITEM
Definition: commctrl.h:3532
#define LVNI_SELECTED
Definition: commctrl.h:2429
#define LVNI_FOCUSED
Definition: commctrl.h:2428
_Out_opt_ int * cx
Definition: commctrl.h:585
#define TreeView_GetParent(hwnd, hitem)
Definition: commctrl.h:3474
#define ListView_GetNextItem(hwnd, i, flags)
Definition: commctrl.h:2439
#define TreeView_GetSelection(hwnd)
Definition: commctrl.h:3478
#define TreeView_GetItem(hwnd, pitem)
Definition: commctrl.h:3495
#define TreeView_GetItemRect(hwnd, hitem, prc, code)
Definition: commctrl.h:3434
#define ListView_GetSelectedCount(hwndLV)
Definition: commctrl.h:2714
#define LVM_GETITEMRECT
Definition: commctrl.h:2482
#define ListView_DeleteAllItems(hwnd)
Definition: commctrl.h:2419
#define TVIS_EXPANDED
Definition: commctrl.h:3289
#define SB_SETTEXTW
Definition: commctrl.h:1947
#define TVIF_CHILDREN
Definition: commctrl.h:3277
#define TreeView_HitTest(hwnd, lpht)
Definition: commctrl.h:3518
#define TVIF_STATE
Definition: commctrl.h:3274
#define LVIR_BOUNDS
Definition: commctrl.h:2477
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
static unsigned __int64 next
Definition: rand_nt.c:6
#define WM_CONTEXTMENU
Definition: richedit.h:64
#define WM_NOTIFY
Definition: richedit.h:61
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define memset(x, y, z)
Definition: compat.h:39
#define _countof(array)
Definition: sndvol32.h:70
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:166
STRSAFEAPI StringCbPrintfW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:557
Definition: main.h:48
int nSplitPos
Definition: main.h:56
WCHAR szPath[MAX_PATH]
Definition: main.h:58
HWND hAddressBtnWnd
Definition: main.h:53
int nFocusPanel
Definition: main.h:55
HICON hArrowIcon
Definition: main.h:54
HWND hTreeWnd
Definition: main.h:50
HWND hListWnd
Definition: main.h:51
HWND hAddressBarWnd
Definition: main.h:52
HWND hWnd
Definition: main.h:49
struct DummyEnumStringsVtbl * lpVtbl
Definition: childwnd.c:71
Definition: tftpd.h:60
LPWSTR dwTypeData
Definition: winuser.h:3280
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
HTREEITEM hItem
Definition: commctrl.h:3526
#define max(a, b)
Definition: svc.c:63
#define GetWindowLongPtr
Definition: treelist.c:73
#define SetWindowLongPtr
Definition: treelist.c:70
#define GWLP_WNDPROC
Definition: treelist.c:66
#define GWLP_USERDATA
Definition: treelist.c:63
uint32_t DWORD_PTR
Definition: typedefs.h:65
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
#define HIWORD(l)
Definition: typedefs.h:247
_In_ size_t cnt
Definition: wcstombs.cpp:43
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1394
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
#define E_NOINTERFACE
Definition: winerror.h:2364
HGDIOBJ WINAPI GetStockObject(_In_ int)
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
#define PATINVERT
Definition: wingdi.h:328
#define DEFAULT_GUI_FONT
Definition: wingdi.h:909
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1546
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
HBRUSH WINAPI CreatePatternBrush(_In_ HBITMAP)
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define HKEY_CURRENT_CONFIG
Definition: winreg.h:15
#define HKEY_DYN_DATA
Definition: winreg.h:16
#define HKEY_CURRENT_USER
Definition: winreg.h:11
ACCESS_MASK REGSAM
Definition: winreg.h:69
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
#define HKEY_USERS
Definition: winreg.h:13
HWND WINAPI SetCapture(_In_ HWND hWnd)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define SWP_NOACTIVATE
Definition: winuser.h:1253
#define MF_BYCOMMAND
Definition: winuser.h:202
BOOL WINAPI RedrawWindow(_In_opt_ HWND, _In_opt_ LPCRECT, _In_opt_ HRGN, _In_ UINT)
#define MIIM_STRING
Definition: winuser.h:738
#define SM_CYEDGE
Definition: winuser.h:1020
#define MIIM_ID
Definition: winuser.h:733
#define WM_KEYUP
Definition: winuser.h:1727
#define DCX_CACHE
Definition: winuser.h:2125
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2890
BOOL WINAPI SetMenuDefaultItem(_In_ HMENU, _In_ UINT, _In_ UINT)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IMAGE_ICON
Definition: winuser.h:212
#define AppendMenu
Definition: winuser.h:5751
#define WM_CAPTURECHANGED
Definition: winuser.h:1819
#define TPM_RIGHTBUTTON
Definition: winuser.h:2391
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define WM_CREATE
Definition: winuser.h:1619
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define BS_ICON
Definition: winuser.h:264
#define WM_SIZE
Definition: winuser.h:1622
#define WM_COMMAND
Definition: winuser.h:1751
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hInst, _In_ LPCWSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
Definition: cursoricon.c:2540
#define IDC_ARROW
Definition: winuser.h:695
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
Definition: cursoricon.c:3032
#define InsertMenuItem
Definition: winuser.h:5824
#define WM_SETFOCUS
Definition: winuser.h:1624
#define SetMenuItemInfo
Definition: winuser.h:5870
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define WM_MOUSEMOVE
Definition: winuser.h:1786
HDC WINAPI GetDCEx(_In_opt_ HWND, _In_opt_ HRGN, _In_ DWORD)
HWND WINAPI GetCapture(void)
Definition: message.c:2881
#define SIZE_MINIMIZED
Definition: winuser.h:2517
#define RDW_NOCHILDREN
Definition: winuser.h:1233
#define WM_LBUTTONDOWN
Definition: winuser.h:1787
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2442
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
#define MIIM_STATE
Definition: winuser.h:732
#define MFS_DEFAULT
Definition: winuser.h:759
#define BM_SETIMAGE
Definition: winuser.h:1933
#define WM_RBUTTONDOWN
Definition: winuser.h:1790
#define WM_SETTEXT
Definition: winuser.h:1628
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define VK_RETURN
Definition: winuser.h:2212
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
HWND WINAPI SetFocus(_In_opt_ HWND)
#define MF_ENABLED
Definition: winuser.h:128
#define MFS_GRAYED
Definition: winuser.h:762
#define MF_SEPARATOR
Definition: winuser.h:137
#define BS_FLAT
Definition: winuser.h:280
#define SWP_NOCOPYBITS
Definition: winuser.h:1254
#define WM_SETFONT
Definition: winuser.h:1661
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
#define MF_BYPOSITION
Definition: winuser.h:203
BOOL WINAPI RemoveMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
#define HTCLIENT
Definition: winuser.h:2486
#define BS_VCENTER
Definition: winuser.h:279
#define WM_LBUTTONUP
Definition: winuser.h:1788
#define CW_USEDEFAULT
Definition: winuser.h:225
#define WM_SETCURSOR
Definition: winuser.h:1647
HDWP WINAPI DeferWindowPos(_In_ HDWP, _In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define BN_CLICKED
Definition: winuser.h:1936
BOOL WINAPI TrackPopupMenu(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _Reserved_ int, _In_ HWND, _Reserved_ LPCRECT)
#define WM_DESTROY
Definition: winuser.h:1620
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
#define WM_KEYDOWN
Definition: winuser.h:1726
#define BS_CENTER
Definition: winuser.h:260
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2917
#define SWP_NOZORDER
Definition: winuser.h:1258
LRESULT WINAPI CallWindowProcW(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IDC_SIZEWE
Definition: winuser.h:702
#define GetMenuItemInfo
Definition: winuser.h:5808
#define VK_ESCAPE
Definition: winuser.h:2225
BOOL WINAPI IsWindowVisible(_In_ HWND)
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
int WINAPI GetSystemMetrics(_In_ int)
#define RDW_INVALIDATE
Definition: winuser.h:1225
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HDWP WINAPI BeginDeferWindowPos(_In_ int)
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2390
#define MF_GRAYED
Definition: winuser.h:129
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)
#define MF_DISABLED
Definition: winuser.h:130
_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
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185