ReactOS 0.4.15-dev-8222-g9164419
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 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22#include "regedit.h"
23
25static int last_split;
27HBRUSH SizingBrush = 0;
29
31{
32 if (hRootKey == HKEY_CLASSES_ROOT) return L"HKEY_CLASSES_ROOT";
33 if (hRootKey == HKEY_CURRENT_USER) return L"HKEY_CURRENT_USER";
34 if (hRootKey == HKEY_LOCAL_MACHINE) return L"HKEY_LOCAL_MACHINE";
35 if (hRootKey == HKEY_USERS) return L"HKEY_USERS";
36 if (hRootKey == HKEY_CURRENT_CONFIG) return L"HKEY_CURRENT_CONFIG";
37 if (hRootKey == HKEY_DYN_DATA) return L"HKEY_DYN_DATA";
38
39 return L"UNKNOWN HKEY, PLEASE REPORT";
40}
41
43{
44 RECT rc;
45 GetClientRect(hWnd, &rc);
46 return min(max(x, SPLIT_MIN), rc.right - SPLIT_MIN);
47}
48
49extern void ResizeWnd(int cx, int cy)
50{
51 HDWP hdwp = BeginDeferWindowPos(4);
52 RECT rt, rs, rb;
53 const int nButtonWidth = 44;
54 const int nButtonHeight = 22;
55 int cyEdge = GetSystemMetrics(SM_CYEDGE);
57 SetRect(&rt, 0, 0, cx, cy);
58 cy = 0;
59 if (hStatusBar != NULL)
60 {
62 cy = rs.bottom - rs.top;
63 }
65
67
69 if (hdwp)
71 rt.left, rt.top,
72 rt.right - rt.left - nButtonWidth, nButtonHeight,
73 uFlags);
74 if (hdwp)
76 rt.right - nButtonWidth, rt.top,
77 nButtonWidth, nButtonHeight,
78 uFlags);
79 if (hdwp)
81 rt.left,
82 rt.top + nButtonHeight + cyEdge,
84 rt.bottom - rt.top - cy - 2 * cyEdge,
85 uFlags);
86 if (hdwp)
88 rt.left + cx,
89 rt.top + nButtonHeight + cyEdge,
90 rt.right - cx,
91 rt.bottom - rt.top - cy - 2 * cyEdge,
92 uFlags);
93 if (hdwp)
95}
96
97/*******************************************************************************
98 * Local module support methods
99 */
100
101static void draw_splitbar(HWND hWnd, int x)
102{
103 RECT rt;
104 HGDIOBJ OldObj;
105 HDC hdc = GetDC(hWnd);
106
107 if(!SizingPattern)
108 {
109 const DWORD Pattern[4] = {0x5555AAAA, 0x5555AAAA, 0x5555AAAA, 0x5555AAAA};
110 SizingPattern = CreateBitmap(8, 8, 1, 1, Pattern);
111 }
112 if(!SizingBrush)
113 {
115 }
116 GetClientRect(hWnd, &rt);
117 rt.left = x - SPLIT_WIDTH/2;
118 rt.right = x + SPLIT_WIDTH/2+1;
119 OldObj = SelectObject(hdc, SizingBrush);
120 PatBlt(hdc, rt.left, rt.top, rt.right - rt.left, rt.bottom - rt.top, PATINVERT);
121 SelectObject(hdc, OldObj);
123}
124
125/*******************************************************************************
126 * finish_splitbar [internal]
127 *
128 * make the splitbar invisible and resize the windows
129 * (helper for ChildWndProc)
130 */
131static void finish_splitbar(HWND hWnd, int x)
132{
133 RECT rt;
134
136 last_split = -1;
137 GetClientRect(hWnd, &rt);
139 ResizeWnd(rt.right, rt.bottom);
141}
142
143/*******************************************************************************
144 *
145 * Key suggestion
146 */
147
148#define MIN(a,b) ((a < b) ? (a) : (b))
149
150static void SuggestKeys(HKEY hRootKey, LPCWSTR pszKeyPath, LPWSTR pszSuggestions,
151 size_t iSuggestionsLength)
152{
153 WCHAR szBuffer[256];
154 WCHAR szLastFound[256];
155 size_t i;
156 HKEY hOtherKey, hSubKey;
157 BOOL bFound;
159
160 memset(pszSuggestions, 0, iSuggestionsLength * sizeof(*pszSuggestions));
161 iSuggestionsLength--;
162
163 /* Are we a root key in HKEY_CLASSES_ROOT? */
164 if ((hRootKey == HKEY_CLASSES_ROOT) && pszKeyPath[0] && !wcschr(pszKeyPath, L'\\'))
165 {
166 do
167 {
168 bFound = FALSE;
169
170 /* Check default key */
171 if (QueryStringValue(hRootKey, pszKeyPath, NULL,
172 szBuffer, ARRAY_SIZE(szBuffer)) == ERROR_SUCCESS)
173 {
174 /* Sanity check this key; it cannot be empty, nor can it be a
175 * loop back */
176 if ((szBuffer[0] != L'\0') && _wcsicmp(szBuffer, pszKeyPath))
177 {
178 if (RegOpenKeyExW(hRootKey, szBuffer, 0, regsam, &hOtherKey) == ERROR_SUCCESS)
179 {
180 lstrcpynW(pszSuggestions, L"HKCR\\", (int) iSuggestionsLength);
181 i = wcslen(pszSuggestions);
182 pszSuggestions += i;
183 iSuggestionsLength -= i;
184
185 lstrcpynW(pszSuggestions, szBuffer, (int) iSuggestionsLength);
186 i = MIN(wcslen(pszSuggestions) + 1, iSuggestionsLength);
187 pszSuggestions += i;
188 iSuggestionsLength -= i;
189 RegCloseKey(hOtherKey);
190
191 bFound = TRUE;
192 StringCbCopyW(szLastFound, sizeof(szLastFound), szBuffer);
193 pszKeyPath = szLastFound;
194 }
195 }
196 }
197 }
198 while(bFound && (iSuggestionsLength > 0));
199
200 /* Check CLSID key */
201 if (RegOpenKeyExW(hRootKey, pszKeyPath, 0, regsam, &hSubKey) == ERROR_SUCCESS)
202 {
203 if (QueryStringValue(hSubKey, L"CLSID", NULL, szBuffer,
204 ARRAY_SIZE(szBuffer)) == ERROR_SUCCESS)
205 {
206 lstrcpynW(pszSuggestions, L"HKCR\\CLSID\\", (int)iSuggestionsLength);
207 i = wcslen(pszSuggestions);
208 pszSuggestions += i;
209 iSuggestionsLength -= i;
210
211 lstrcpynW(pszSuggestions, szBuffer, (int)iSuggestionsLength);
212 i = MIN(wcslen(pszSuggestions) + 1, iSuggestionsLength);
213 pszSuggestions += i;
214 iSuggestionsLength -= i;
215 }
216 RegCloseKey(hSubKey);
217 }
218 }
219 else if ((hRootKey == HKEY_CURRENT_USER || hRootKey == HKEY_LOCAL_MACHINE) && *pszKeyPath)
220 {
221 LPCWSTR rootstr = hRootKey == HKEY_CURRENT_USER ? L"HKLM" : L"HKCU";
222 hOtherKey = hRootKey == HKEY_CURRENT_USER ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
223 if (RegOpenKeyExW(hOtherKey, pszKeyPath, 0, regsam, &hSubKey) == ERROR_SUCCESS)
224 {
225 int cch;
226 RegCloseKey(hSubKey);
227 cch = _snwprintf(pszSuggestions, iSuggestionsLength, L"%s\\%s", rootstr, pszKeyPath);
228 if (cch <= 0 || cch > iSuggestionsLength)
229 pszSuggestions[0] = UNICODE_NULL;
230 }
231 }
232}
233
234
236{
237 WNDPROC oldwndproc;
238 static WCHAR s_szNode[256];
240
241 switch (uMsg)
242 {
243 case WM_KEYUP:
244 if (wParam == VK_RETURN)
245 {
246 GetWindowTextW(hwnd, s_szNode, ARRAY_SIZE(s_szNode));
247 SelectNode(g_pChildWnd->hTreeWnd, s_szNode);
248 }
249 break;
250 default:
251 break;
252 }
253 return CallWindowProcW(oldwndproc, hwnd, uMsg, wParam, lParam);
254}
255
256VOID
257UpdateAddress(HTREEITEM hItem, HKEY hRootKey, LPCWSTR pszPath, BOOL bSelectNone)
258{
259 LPCWSTR keyPath, rootName;
260 LPWSTR fullPath;
261 DWORD cbFullPath;
262
263 /* Wipe the listview, the status bar and the address bar if the root key was selected */
265 {
269 return;
270 }
271
272 if (pszPath == NULL)
273 keyPath = GetItemPath(g_pChildWnd->hTreeWnd, hItem, &hRootKey);
274 else
275 keyPath = pszPath;
276
277 if (keyPath)
278 {
279 RefreshListView(g_pChildWnd->hListWnd, hRootKey, keyPath, bSelectNone);
280 rootName = get_root_key_name(hRootKey);
281 cbFullPath = (wcslen(rootName) + 1 + wcslen(keyPath) + 1) * sizeof(WCHAR);
282 fullPath = malloc(cbFullPath);
283 if (fullPath)
284 {
285 /* set (correct) the address bar text */
286 if (keyPath[0] != UNICODE_NULL)
287 StringCbPrintfW(fullPath, cbFullPath, L"%s%s%s", rootName,
288 ((keyPath[0] == L'\\') ? L"" : L"\\"), keyPath);
289 else
290 StringCbCopyW(fullPath, cbFullPath, rootName);
291
294 free(fullPath);
295
296 /* disable hive manipulation items temporarily (enable only if necessary) */
299 /* compare the strings to see if we should enable/disable the "Load Hive" menus accordingly */
300 if (_wcsicmp(rootName, L"HKEY_LOCAL_MACHINE") == 0 ||
301 _wcsicmp(rootName, L"HKEY_USERS") == 0)
302 {
303 /*
304 * enable the unload menu item if at the root, otherwise
305 * enable the load menu item if there is no slash in
306 * keyPath (ie. immediate child selected)
307 */
308 if (keyPath[0] == UNICODE_NULL)
310 else if (!wcschr(keyPath, L'\\'))
312 }
313 }
314 }
315}
316
317/*******************************************************************************
318 *
319 * FUNCTION: ChildWndProc(HWND, unsigned, WORD, LONG)
320 *
321 * PURPOSE: Processes messages for the child windows.
322 *
323 * WM_COMMAND - process the application menu
324 * WM_DESTROY - post a quit message and return
325 *
326 */
328{
329 BOOL Result;
330 RECT rc;
331
332 switch (message)
333 {
334 case WM_CREATE:
335 {
336 WNDPROC oldproc;
337 HFONT hFont;
339 DWORD style;
340
341 /* Load "My Computer" string */
343
345 if (!g_pChildWnd) return 0;
346
348 g_pChildWnd->nSplitPos = 190;
350
354 hWnd, (HMENU)0, hInst, 0);
355
358 g_pChildWnd->hAddressBtnWnd = CreateWindowExW(0, L"Button", L"\x00BB", style,
360 hWnd, (HMENU)0, hInst, 0);
362 IMAGE_ICON, 12, 12, 0);
364
365 GetClientRect(hWnd, &rc);
369
370 /* set the address bar and button font */
372 {
376 (WPARAM)hFont,
377 0);
380 (WPARAM)hFont,
381 0);
382 }
383 /* Subclass the AddressBar */
387 break;
388 }
389 case WM_COMMAND:
390 if(HIWORD(wParam) == BN_CLICKED)
391 {
393 }
394 break; //goto def;
395 case WM_SETCURSOR:
396 if (LOWORD(lParam) == HTCLIENT)
397 {
398 POINT pt;
402 {
404 return TRUE;
405 }
406 }
407 goto def;
408
409 case WM_DESTROY:
417 break;
418
419 case WM_LBUTTONDOWN:
420 {
421 INT x = (SHORT)LOWORD(lParam);
422 if (x >= g_pChildWnd->nSplitPos - SPLIT_WIDTH / 2 &&
423 x < g_pChildWnd->nSplitPos + SPLIT_WIDTH / 2 + 1)
424 {
427 last_split = x;
429 }
430 break;
431 }
432
433 case WM_LBUTTONUP:
434 case WM_RBUTTONDOWN:
435 if (GetCapture() == hWnd)
436 {
437 INT x = (SHORT)LOWORD(lParam);
440 }
441 break;
442
444 if (GetCapture() == hWnd && last_split >= 0)
446 break;
447
448 case WM_KEYDOWN:
449 if (wParam == VK_ESCAPE)
450 if (GetCapture() == hWnd)
451 {
452 RECT rt;
454 GetClientRect(hWnd, &rt);
455 ResizeWnd(rt.right, rt.bottom);
456 last_split = -1;
459 }
460 break;
461
462 case WM_MOUSEMOVE:
463 if (GetCapture() == hWnd)
464 {
465 INT x = (SHORT)LOWORD(lParam);
467 if (last_split != x)
468 {
470 last_split = x;
472 }
473 }
474 break;
475
476 case WM_SETFOCUS:
477 if (g_pChildWnd != NULL)
478 {
480 }
481 break;
482
483 case WM_NOTIFY:
484 if (g_pChildWnd == NULL) break;
485
486 if (((LPNMHDR)lParam)->idFrom == TREE_WINDOW)
487 {
489 {
490 goto def;
491 }
492
493 return Result;
494 }
495 else
496 {
497 if (((LPNMHDR)lParam)->idFrom == LIST_WINDOW)
498 {
500 {
501 goto def;
502 }
503
504 return Result;
505 }
506 else
507 {
508 goto def;
509 }
510 }
511 break;
512
513 case WM_CONTEXTMENU:
514 {
515 POINT pt;
517 {
518 int i, cnt;
519 BOOL IsDefault;
520 pt.x = (short) LOWORD(lParam);
521 pt.y = (short) HIWORD(lParam);
524 if (pt.x == -1 && pt.y == -1)
525 {
526 RECT rc;
527 if (i != -1)
528 {
529 rc.left = LVIR_BOUNDS;
531 pt.x = rc.left + 8;
532 pt.y = rc.top + 8;
533 }
534 else
535 pt.x = pt.y = 0;
537 }
538 if(i == -1)
539 {
541 }
542 else
543 {
546 IsDefault = IsDefaultValue(g_pChildWnd->hListWnd, i);
547 if(cnt == 1)
549 else
553
555 }
556 }
557 else if ((HWND)wParam == g_pChildWnd->hTreeWnd)
558 {
559 TVHITTESTINFO hti;
560 HMENU hContextMenu;
562 MENUITEMINFOW mii;
563 WCHAR resource[256];
564 WCHAR buffer[256];
565 LPWSTR s;
566 LPCWSTR keyPath;
567 HKEY hRootKey;
568 int iLastPos;
569 WORD wID;
570 BOOL isRoot;
571
572 pt.x = (short) LOWORD(lParam);
573 pt.y = (short) HIWORD(lParam);
574
575 if (pt.x == -1 && pt.y == -1)
576 {
577 RECT rc;
579 if (hti.hItem != NULL)
580 {
582 pt.x = rc.left + 8;
583 pt.y = rc.top + 8;
585 hti.flags = TVHT_ONITEM;
586 }
587 else
588 hti.flags = 0;
589 }
590 else
591 {
592 hti.pt.x = pt.x;
593 hti.pt.y = pt.y;
596 }
597
598 if (hti.flags & TVHT_ONITEM)
599 {
601
602 isRoot = (TreeView_GetParent(g_pChildWnd->hTreeWnd, hti.hItem) == NULL);
603 hContextMenu = GetSubMenu(hPopupMenus, isRoot ? PM_ROOTITEM : PM_TREECONTEXT);
604
605 memset(&item, 0, sizeof(item));
607 item.hItem = hti.hItem;
609
610 /* Set the Expand/Collapse menu item appropriately */
612 memset(&mii, 0, sizeof(mii));
613 mii.cbSize = sizeof(mii);
615 mii.fState = (item.cChildren > 0) ? MFS_DEFAULT : MFS_GRAYED;
617 mii.dwTypeData = (LPWSTR) buffer;
618 SetMenuItemInfo(hContextMenu, 0, TRUE, &mii);
619
620 if (isRoot == FALSE)
621 {
622 /* Remove any existing suggestions */
623 memset(&mii, 0, sizeof(mii));
624 mii.cbSize = sizeof(mii);
625 mii.fMask = MIIM_ID;
626 GetMenuItemInfo(hContextMenu, GetMenuItemCount(hContextMenu) - 1, TRUE, &mii);
627 if ((mii.wID >= ID_TREE_SUGGESTION_MIN) && (mii.wID <= ID_TREE_SUGGESTION_MAX))
628 {
629 do
630 {
631 iLastPos = GetMenuItemCount(hContextMenu) - 1;
632 GetMenuItemInfo(hContextMenu, iLastPos, TRUE, &mii);
633 RemoveMenu(hContextMenu, iLastPos, MF_BYPOSITION);
634 }
635 while((mii.wID >= ID_TREE_SUGGESTION_MIN) && (mii.wID <= ID_TREE_SUGGESTION_MAX));
636 }
637
638 /* Come up with suggestions */
639 keyPath = GetItemPath(g_pChildWnd->hTreeWnd, NULL, &hRootKey);
640 SuggestKeys(hRootKey, keyPath, Suggestions, ARRAY_SIZE(Suggestions));
641 if (Suggestions[0])
642 {
643 AppendMenu(hContextMenu, MF_SEPARATOR, 0, NULL);
644
646
647 s = Suggestions;
649 while(*s && (wID <= ID_TREE_SUGGESTION_MAX))
650 {
651 WCHAR *path = s, buf[MAX_PATH];
652 if (hRootKey == HKEY_CURRENT_USER || hRootKey == HKEY_LOCAL_MACHINE)
653 {
654 // Windows 10 only displays the root name
656 if (next > s)
657 lstrcpynW(path = buf, s, min(next - s, _countof(buf)));
658 }
660
661 memset(&mii, 0, sizeof(mii));
662 mii.cbSize = sizeof(mii);
663 mii.fMask = MIIM_STRING | MIIM_ID;
664 mii.wID = wID++;
665 mii.dwTypeData = buffer;
666 InsertMenuItem(hContextMenu, GetMenuItemCount(hContextMenu), TRUE, &mii);
667
668 s += wcslen(s) + 1;
669 }
670 }
671 }
672 TrackPopupMenu(hContextMenu, TPM_RIGHTBUTTON, pt.x, pt.y, 0, hFrameWnd, NULL);
673 }
674 }
675 break;
676 }
677
678 case WM_SIZE:
680 {
682 }
683 break;
684
685 default:
686def:
688 }
689 return 0;
690}
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:131
static int last_split
Definition: childwnd.c:25
static void draw_splitbar(HWND hWnd, int x)
Definition: childwnd.c:101
LRESULT CALLBACK AddressBarProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: childwnd.c:235
HBRUSH SizingBrush
Definition: childwnd.c:27
LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: childwnd.c:327
#define MIN(a, b)
Definition: childwnd.c:148
ChildWnd * g_pChildWnd
Definition: childwnd.c:24
static INT ClampSplitBarX(HWND hWnd, INT x)
Definition: childwnd.c:42
LPCWSTR get_root_key_name(HKEY hRootKey)
Definition: childwnd.c:30
HBITMAP SizingPattern
Definition: childwnd.c:26
WCHAR Suggestions[256]
Definition: childwnd.c:28
VOID UpdateAddress(HTREEITEM hItem, HKEY hRootKey, LPCWSTR pszPath, BOOL bSelectNone)
Definition: childwnd.c:257
static void SuggestKeys(HKEY hRootKey, LPCWSTR pszKeyPath, LPWSTR pszSuggestions, size_t iSuggestionsLength)
Definition: childwnd.c:150
void ResizeWnd(int cx, int cy)
Definition: childwnd.c:49
BOOL IsDefaultValue(HWND hwndLV, int i)
Definition: listview.c:108
BOOL RefreshListView(HWND hwndLV, HKEY hKey, LPCWSTR keyPath, BOOL bSelectNone)
Definition: listview.c:672
BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result)
Definition: listview.c:545
void DestroyListView(HWND hwndLV)
Definition: listview.c:655
HMENU hPopupMenus
Definition: main.c:38
HWND hFrameWnd
Definition: main.c:35
void DestroyMainMenu()
Definition: main.c:164
HMENU hMenuFrame
Definition: main.c:37
HWND hStatusBar
Definition: main.c:36
HFONT hFont
Definition: main.c:53
HWND CreateTreeView(HWND hwndParent, LPWSTR pHostName, HMENU id)
Definition: treeview.c:754
#define PM_TREECONTEXT
Definition: main.h:37
BOOL SelectNode(HWND hwndTV, LPCWSTR keyPath)
Definition: treeview.c:787
#define ARRAY_SIZE(A)
Definition: main.h:33
#define LIST_WINDOW
Definition: main.h:28
#define SPLIT_MIN
Definition: main.h:31
BOOL TreeWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result)
Definition: treeview.c:643
#define TREE_WINDOW
Definition: main.h:27
#define PM_NEW
Definition: main.h:36
LPCWSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY *phRootKey)
Definition: treeview.c:88
#define PM_ROOTITEM
Definition: main.h:38
#define PM_MODIFYVALUE
Definition: main.h:35
#define ID_TREE_SUGGESTION_MIN
Definition: resource.h:156
#define IDS_MY_COMPUTER
Definition: resource.h:129
#define IDS_COLLAPSE
Definition: resource.h:191
#define IDI_ARROW
Definition: resource.h:37
#define ID_EDIT_MODIFY
Definition: resource.h:62
#define ID_REGISTRY_UNLOADHIVE
Definition: resource.h:105
#define ID_TREE_EXPANDBRANCH
Definition: resource.h:93
#define ID_TREE_COLLAPSEBRANCH
Definition: resource.h:95
#define IDS_GOTO_SUGGESTED_KEY
Definition: resource.h:194
#define ID_EDIT_MODIFY_BIN
Definition: resource.h:122
#define IDS_EXPAND
Definition: resource.h:190
#define ID_TREE_SUGGESTION_MAX
Definition: resource.h:157
#define ID_EDIT_RENAME
Definition: resource.h:58
#define ID_REGISTRY_LOADHIVE
Definition: resource.h:104
#define RegCloseKey(hKey)
Definition: registry.h:49
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#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
LPWSTR WINAPI PathFindNextComponentW(LPCWSTR lpszPath)
Definition: path.c:2579
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)
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:92
static HICON
Definition: imagelist.c:84
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
#define LOWORD(l)
Definition: pedump.c:82
#define WS_CHILD
Definition: pedump.c:617
#define WS_TABSTOP
Definition: pedump.c:634
#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:3481
#define TVHT_ONITEM
Definition: commctrl.h:3527
#define LVNI_SELECTED
Definition: commctrl.h:2424
#define LVNI_FOCUSED
Definition: commctrl.h:2423
_Out_opt_ int * cx
Definition: commctrl.h:585
#define TreeView_GetParent(hwnd, hitem)
Definition: commctrl.h:3469
#define ListView_GetNextItem(hwnd, i, flags)
Definition: commctrl.h:2434
#define TreeView_GetSelection(hwnd)
Definition: commctrl.h:3473
#define TreeView_GetItem(hwnd, pitem)
Definition: commctrl.h:3490
#define TreeView_GetItemRect(hwnd, hitem, prc, code)
Definition: commctrl.h:3429
#define ListView_GetSelectedCount(hwndLV)
Definition: commctrl.h:2709
#define LVM_GETITEMRECT
Definition: commctrl.h:2477
#define ListView_DeleteAllItems(hwnd)
Definition: commctrl.h:2414
#define TVIS_EXPANDED
Definition: commctrl.h:3284
#define SB_SETTEXTW
Definition: commctrl.h:1942
#define TVIF_CHILDREN
Definition: commctrl.h:3272
#define TreeView_HitTest(hwnd, lpht)
Definition: commctrl.h:3513
#define TVIF_STATE
Definition: commctrl.h:3269
#define LVIR_BOUNDS
Definition: commctrl.h:2472
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)
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
#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:61
int nSplitPos
Definition: main.h:69
WCHAR szPath[MAX_PATH]
Definition: main.h:71
HWND hAddressBtnWnd
Definition: main.h:66
int nFocusPanel
Definition: main.h:68
HICON hArrowIcon
Definition: main.h:67
HWND hTreeWnd
Definition: main.h:63
HWND hListWnd
Definition: main.h:64
HWND hAddressBarWnd
Definition: main.h:65
HWND hWnd
Definition: main.h:62
Definition: tftpd.h:60
LPWSTR dwTypeData
Definition: winuser.h:3269
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:3521
#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
#define HIWORD(l)
Definition: typedefs.h:247
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1412
_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
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:1539
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:1242
#define MF_BYCOMMAND
Definition: winuser.h:202
#define MIIM_STRING
Definition: winuser.h:727
#define SM_CYEDGE
Definition: winuser.h:1009
#define MIIM_ID
Definition: winuser.h:722
#define WM_KEYUP
Definition: winuser.h:1716
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:5740
#define WM_CAPTURECHANGED
Definition: winuser.h:1808
#define TPM_RIGHTBUTTON
Definition: winuser.h:2380
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define WM_CREATE
Definition: winuser.h:1608
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:1611
#define WM_COMMAND
Definition: winuser.h:1740
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:2234
#define IDC_ARROW
Definition: winuser.h:687
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
Definition: cursoricon.c:2701
#define InsertMenuItem
Definition: winuser.h:5813
#define WM_SETFOCUS
Definition: winuser.h:1613
#define SetMenuItemInfo
Definition: winuser.h:5859
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define WM_MOUSEMOVE
Definition: winuser.h:1775
HWND WINAPI GetCapture(void)
Definition: message.c:2881
#define SIZE_MINIMIZED
Definition: winuser.h:2506
#define WM_LBUTTONDOWN
Definition: winuser.h:1776
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2136
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
#define MIIM_STATE
Definition: winuser.h:721
#define MFS_DEFAULT
Definition: winuser.h:748
#define BM_SETIMAGE
Definition: winuser.h:1922
#define WM_RBUTTONDOWN
Definition: winuser.h:1779
#define WM_SETTEXT
Definition: winuser.h:1617
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define VK_RETURN
Definition: winuser.h:2201
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:751
#define MF_SEPARATOR
Definition: winuser.h:137
#define BS_FLAT
Definition: winuser.h:280
#define WM_SETFONT
Definition: winuser.h:1650
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:2475
#define BS_VCENTER
Definition: winuser.h:279
HDC WINAPI GetDC(_In_opt_ HWND)
#define WM_LBUTTONUP
Definition: winuser.h:1777
#define CW_USEDEFAULT
Definition: winuser.h:225
#define WM_SETCURSOR
Definition: winuser.h:1636
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:1925
BOOL WINAPI TrackPopupMenu(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _Reserved_ int, _In_ HWND, _Reserved_ LPCRECT)
#define WM_DESTROY
Definition: winuser.h:1609
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
#define WM_KEYDOWN
Definition: winuser.h:1715
#define BS_CENTER
Definition: winuser.h:260
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2906
#define SWP_NOZORDER
Definition: winuser.h:1247
LRESULT WINAPI CallWindowProcW(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IDC_SIZEWE
Definition: winuser.h:694
#define GetMenuItemInfo
Definition: winuser.h:5797
#define VK_ESCAPE
Definition: winuser.h:2214
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
int WINAPI GetSystemMetrics(_In_ int)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
HDWP WINAPI BeginDeferWindowPos(_In_ int)
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2084
#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