ReactOS  0.4.15-dev-313-g8fde48b
childwnd.c File Reference
#include "regedit.h"
Include dependency graph for childwnd.c:

Go to the source code of this file.

Macros

#define MIN(a, b)   ((a < b) ? (a) : (b))
 

Functions

LPCWSTR get_root_key_name (HKEY hRootKey)
 
void ResizeWnd (int cx, int cy)
 
static void draw_splitbar (HWND hWnd, int x)
 
static void finish_splitbar (HWND hWnd, int x)
 
static void SuggestKeys (HKEY hRootKey, LPCWSTR pszKeyPath, LPWSTR pszSuggestions, size_t iSuggestionsLength)
 
LRESULT CALLBACK AddressBarProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
VOID UpdateAddress (HTREEITEM hItem, HKEY hRootKey, LPCWSTR pszPath)
 
LRESULT CALLBACK ChildWndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 

Variables

ChildWndg_pChildWnd
 
static int last_split
 
HBITMAP SizingPattern = 0
 
HBRUSH SizingBrush = 0
 
WCHAR Suggestions [256]
 

Macro Definition Documentation

◆ MIN

#define MIN (   a,
  b 
)    ((a < b) ? (a) : (b))

Definition at line 137 of file childwnd.c.

Function Documentation

◆ AddressBarProc()

LRESULT CALLBACK AddressBarProc ( HWND  hwnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 210 of file childwnd.c.

211 {
212  WNDPROC oldwndproc;
213  static WCHAR s_szNode[256];
214  oldwndproc = (WNDPROC)GetWindowLongPtr(hwnd, GWLP_USERDATA);
215 
216  switch (uMsg)
217  {
218  case WM_KEYUP:
219  if (wParam == VK_RETURN)
220  {
221  GetWindowTextW(hwnd, s_szNode, COUNT_OF(s_szNode));
222  SelectNode(g_pChildWnd->hTreeWnd, s_szNode);
223  }
224  break;
225  default:
226  break;
227  }
228  return CallWindowProcW(oldwndproc, hwnd, uMsg, wParam, lParam);
229 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
ChildWnd * g_pChildWnd
Definition: childwnd.c:23
HWND hTreeWnd
Definition: main.h:61
#define VK_RETURN
Definition: winuser.h:2176
WPARAM wParam
Definition: combotst.c:138
#define GWLP_USERDATA
Definition: treelist.c:63
#define COUNT_OF(a)
Definition: main.h:33
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define WM_KEYUP
Definition: winuser.h:1698
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2881
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1412
LRESULT WINAPI CallWindowProcW(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL SelectNode(HWND hwndTV, LPCWSTR keyPath)
Definition: treeview.c:771
#define GetWindowLongPtr
Definition: treelist.c:73
LPARAM lParam
Definition: combotst.c:139

Referenced by ChildWndProc().

◆ ChildWndProc()

static LRESULT CALLBACK ChildWndProc ( HWND  hWnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 301 of file childwnd.c.

302 {
303  BOOL Result;
304  RECT rc;
305 
306  switch (message)
307  {
308  case WM_CREATE:
309  {
310  WNDPROC oldproc;
311  HFONT hFont;
313  DWORD style;
314 
315  /* Load "My Computer" string */
317 
319  if (!g_pChildWnd) return 0;
320 
322  g_pChildWnd->nSplitPos = 190;
323  g_pChildWnd->hWnd = hWnd;
324 
328  hWnd, (HMENU)0, hInst, 0);
329 
332  g_pChildWnd->hAddressBtnWnd = CreateWindowExW(0, L"Button", L"\x00BB", style,
334  hWnd, (HMENU)0, hInst, 0);
336  IMAGE_ICON, 12, 12, 0);
338 
339  GetClientRect(hWnd, &rc);
343 
344  /* set the address bar and button font */
346  {
349  WM_SETFONT,
350  (WPARAM)hFont,
351  0);
353  WM_SETFONT,
354  (WPARAM)hFont,
355  0);
356  }
357  /* Subclass the AddressBar */
361  break;
362  }
363  case WM_COMMAND:
364  if(HIWORD(wParam) == BN_CLICKED)
365  {
367  }
368  break; //goto def;
369  case WM_SETCURSOR:
370  if (LOWORD(lParam) == HTCLIENT)
371  {
372  POINT pt;
373  GetCursorPos(&pt);
376  {
378  return TRUE;
379  }
380  }
381  goto def;
382  case WM_DESTROY:
385  DestroyMainMenu();
388  g_pChildWnd = NULL;
389  PostQuitMessage(0);
390  break;
391  case WM_LBUTTONDOWN:
392  {
393  RECT rt;
394  int x = (short)LOWORD(lParam);
395  GetClientRect(hWnd, &rt);
397  {
400  SetCapture(hWnd);
401  }
402  break;
403  }
404 
405  case WM_LBUTTONUP:
406  case WM_RBUTTONDOWN:
407  if (GetCapture() == hWnd)
408  {
410  }
411  break;
412 
413  case WM_CAPTURECHANGED:
414  if (GetCapture()==hWnd && last_split>=0)
416  break;
417 
418  case WM_KEYDOWN:
419  if (wParam == VK_ESCAPE)
420  if (GetCapture() == hWnd)
421  {
422  RECT rt;
424  GetClientRect(hWnd, &rt);
425  ResizeWnd(rt.right, rt.bottom);
426  last_split = -1;
427  ReleaseCapture();
429  }
430  break;
431 
432  case WM_MOUSEMOVE:
433  if (GetCapture() == hWnd)
434  {
435  HDC hdc;
436  RECT rt;
437  HGDIOBJ OldObj;
438  int x = LOWORD(lParam);
439  if(!SizingPattern)
440  {
441  const DWORD Pattern[4] = {0x5555AAAA, 0x5555AAAA, 0x5555AAAA, 0x5555AAAA};
442  SizingPattern = CreateBitmap(8, 8, 1, 1, Pattern);
443  }
444  if(!SizingBrush)
445  {
447  }
448 
449  GetClientRect(hWnd, &rt);
450  x = (SHORT) min(max(x, SPLIT_MIN), rt.right - SPLIT_MIN);
451  if(last_split != x)
452  {
453  rt.left = last_split-SPLIT_WIDTH/2;
454  rt.right = last_split+SPLIT_WIDTH/2+1;
455  hdc = GetDC(hWnd);
456  OldObj = SelectObject(hdc, SizingBrush);
457  PatBlt(hdc, rt.left, rt.top, rt.right - rt.left, rt.bottom - rt.top, PATINVERT);
458  last_split = x;
459  rt.left = x-SPLIT_WIDTH/2;
460  rt.right = x+SPLIT_WIDTH/2+1;
461  PatBlt(hdc, rt.left, rt.top, rt.right - rt.left, rt.bottom - rt.top, PATINVERT);
462  SelectObject(hdc, OldObj);
463  ReleaseDC(hWnd, hdc);
464  }
465  }
466  break;
467 
468  case WM_SETFOCUS:
469  if (g_pChildWnd != NULL)
470  {
472  }
473  break;
474 
475  case WM_TIMER:
476  break;
477 
478  case WM_NOTIFY:
479  if (g_pChildWnd == NULL) break;
480 
481  if (((LPNMHDR)lParam)->idFrom == TREE_WINDOW)
482  {
484  {
485  goto def;
486  }
487 
488  return Result;
489  }
490  else
491  {
492  if (((LPNMHDR)lParam)->idFrom == LIST_WINDOW)
493  {
495  {
496  goto def;
497  }
498 
499  return Result;
500  }
501  else
502  {
503  goto def;
504  }
505  }
506  break;
507 
508  case WM_CONTEXTMENU:
509  {
510  POINT pt;
512  {
513  int i, cnt;
514  BOOL IsDefault;
515  pt.x = (short) LOWORD(lParam);
516  pt.y = (short) HIWORD(lParam);
519  if (pt.x == -1 && pt.y == -1)
520  {
521  RECT rc;
522  if (i != -1)
523  {
524  rc.left = LVIR_BOUNDS;
526  pt.x = rc.left + 8;
527  pt.y = rc.top + 8;
528  }
529  else
530  pt.x = pt.y = 0;
532  }
533  if(i == -1)
534  {
536  }
537  else
538  {
541  IsDefault = IsDefaultValue(g_pChildWnd->hListWnd, i);
542  if(cnt == 1)
544  else
548 
550  }
551  }
552  else if ((HWND)wParam == g_pChildWnd->hTreeWnd)
553  {
554  TVHITTESTINFO hti;
555  HMENU hContextMenu;
556  TVITEMW item;
557  MENUITEMINFOW mii;
558  WCHAR resource[256];
559  WCHAR buffer[256];
560  LPWSTR s;
561  LPCWSTR keyPath;
562  HKEY hRootKey;
563  int iLastPos;
564  WORD wID;
565  BOOL isRoot;
566 
567  pt.x = (short) LOWORD(lParam);
568  pt.y = (short) HIWORD(lParam);
569 
570  if (pt.x == -1 && pt.y == -1)
571  {
572  RECT rc;
574  if (hti.hItem != NULL)
575  {
577  pt.x = rc.left + 8;
578  pt.y = rc.top + 8;
580  hti.flags = TVHT_ONITEM;
581  }
582  else
583  hti.flags = 0;
584  }
585  else
586  {
587  hti.pt.x = pt.x;
588  hti.pt.y = pt.y;
591  }
592 
593  if (hti.flags & TVHT_ONITEM)
594  {
596 
597  isRoot = (TreeView_GetParent(g_pChildWnd->hTreeWnd, hti.hItem) == NULL);
598  hContextMenu = GetSubMenu(hPopupMenus, isRoot ? PM_ROOTITEM : PM_TREECONTEXT);
599 
600  memset(&item, 0, sizeof(item));
601  item.mask = TVIF_STATE | TVIF_CHILDREN;
602  item.hItem = hti.hItem;
604 
605  /* Set the Expand/Collapse menu item appropriately */
607  memset(&mii, 0, sizeof(mii));
608  mii.cbSize = sizeof(mii);
610  mii.fState = (item.cChildren > 0) ? MFS_DEFAULT : MFS_GRAYED;
612  mii.dwTypeData = (LPWSTR) buffer;
613  SetMenuItemInfo(hContextMenu, 0, TRUE, &mii);
614 
615  if (isRoot == FALSE)
616  {
617  /* Remove any existing suggestions */
618  memset(&mii, 0, sizeof(mii));
619  mii.cbSize = sizeof(mii);
620  mii.fMask = MIIM_ID;
621  GetMenuItemInfo(hContextMenu, GetMenuItemCount(hContextMenu) - 1, TRUE, &mii);
622  if ((mii.wID >= ID_TREE_SUGGESTION_MIN) && (mii.wID <= ID_TREE_SUGGESTION_MAX))
623  {
624  do
625  {
626  iLastPos = GetMenuItemCount(hContextMenu) - 1;
627  GetMenuItemInfo(hContextMenu, iLastPos, TRUE, &mii);
628  RemoveMenu(hContextMenu, iLastPos, MF_BYPOSITION);
629  }
630  while((mii.wID >= ID_TREE_SUGGESTION_MIN) && (mii.wID <= ID_TREE_SUGGESTION_MAX));
631  }
632 
633  /* Come up with suggestions */
634  keyPath = GetItemPath(g_pChildWnd->hTreeWnd, NULL, &hRootKey);
635  SuggestKeys(hRootKey, keyPath, Suggestions, COUNT_OF(Suggestions));
636  if (Suggestions[0])
637  {
638  AppendMenu(hContextMenu, MF_SEPARATOR, 0, NULL);
639 
641 
642  s = Suggestions;
644  while(*s && (wID <= ID_TREE_SUGGESTION_MAX))
645  {
647 
648  memset(&mii, 0, sizeof(mii));
649  mii.cbSize = sizeof(mii);
650  mii.fMask = MIIM_STRING | MIIM_ID;
651  mii.wID = wID++;
652  mii.dwTypeData = buffer;
653  InsertMenuItem(hContextMenu, GetMenuItemCount(hContextMenu), TRUE, &mii);
654 
655  s += wcslen(s) + 1;
656  }
657  }
658  }
659  TrackPopupMenu(hContextMenu, TPM_RIGHTBUTTON, pt.x, pt.y, 0, hFrameWnd/*g_pChildWnd->hWnd*/, NULL);
660  }
661  }
662  break;
663  }
664 
665  case WM_SIZE:
666  if (wParam != SIZE_MINIMIZED && g_pChildWnd != NULL)
667  {
669  }
670  /* fall through */
671  default:
672 def:
674  }
675  return 0;
676 }
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define IDC_SIZEWE
Definition: winuser.h:689
#define IDS_GOTO_SUGGESTED_KEY
Definition: resource.h:194
#define ListView_GetNextItem(hwnd, i, flags)
Definition: commctrl.h:2430
#define max(a, b)
Definition: svc.c:63
#define PM_ROOTITEM
Definition: main.h:38
Definition: tftpd.h:59
static HICON
Definition: imagelist.c:84
#define MF_DISABLED
Definition: winuser.h:130
#define TRUE
Definition: types.h:120
void DestroyListView(HWND hwndLV)
Definition: listview.c:653
#define IMAGE_ICON
Definition: winuser.h:212
#define ID_TREE_COLLAPSEBRANCH
Definition: resource.h:98
ChildWnd * g_pChildWnd
Definition: childwnd.c:23
#define TreeView_GetItemRect(hwnd, hitem, prc, code)
Definition: commctrl.h:3425
#define PATINVERT
Definition: wingdi.h:327
#define MF_BYCOMMAND
Definition: winuser.h:202
static void SuggestKeys(HKEY hRootKey, LPCWSTR pszKeyPath, LPWSTR pszSuggestions, size_t iSuggestionsLength)
Definition: childwnd.c:139
long y
Definition: polytest.cpp:48
#define WM_CONTEXTMENU
Definition: richedit.h:64
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
#define WM_LBUTTONDOWN
Definition: winuser.h:1758
LRESULT CALLBACK AddressBarProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: childwnd.c:210
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
long x
Definition: polytest.cpp:48
static void finish_splitbar(HWND hWnd, int x)
Definition: childwnd.c:120
BOOL TreeWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result)
Definition: treeview.c:628
HDC WINAPI GetDC(_In_opt_ HWND)
#define PM_MODIFYVALUE
Definition: main.h:35
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2022
#define pt(x, y)
Definition: drawing.c:79
HWND hTreeWnd
Definition: main.h:61
#define WM_CAPTURECHANGED
Definition: winuser.h:1790
HWND hListWnd
Definition: main.h:62
static HDC
Definition: imagelist.c:92
#define BS_DEFPUSHBUTTON
Definition: pedump.c:652
HWND hWnd
Definition: settings.c:17
LONG top
Definition: windef.h:307
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
GLuint buffer
Definition: glext.h:5915
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
HWND WINAPI SetFocus(_In_opt_ HWND)
LPWSTR dwTypeData
Definition: winuser.h:3244
#define LVNI_SELECTED
Definition: commctrl.h:2420
UINT_PTR WPARAM
Definition: windef.h:207
#define WS_CHILD
Definition: pedump.c:617
LONG left
Definition: windef.h:306
#define MFS_DEFAULT
Definition: winuser.h:743
#define VK_ESCAPE
Definition: winuser.h:2189
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
Definition: cursoricon.c:2635
#define BS_CENTER
Definition: winuser.h:260
LONG right
Definition: windef.h:308
#define BM_SETIMAGE
Definition: winuser.h:1904
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define VK_RETURN
Definition: winuser.h:2176
#define SetWindowLongPtr
Definition: treelist.c:70
WPARAM wParam
Definition: combotst.c:138
#define SPLIT_WIDTH
Definition: eventvwr.c:62
HFONT hFont
Definition: main.c:53
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HBITMAP SizingPattern
Definition: childwnd.c:25
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
Definition: typeof.h:94
int nSplitPos
Definition: main.h:67
#define TPM_RIGHTBUTTON
Definition: winuser.h:2355
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
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define ListView_GetSelectedCount(hwndLV)
Definition: commctrl.h:2705
#define TVIF_CHILDREN
Definition: commctrl.h:3268
#define ID_TREE_SUGGESTION_MIN
Definition: resource.h:159
#define MIIM_STATE
Definition: winuser.h:716
unsigned int BOOL
Definition: ntddk_ex.h:94
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
Definition: cursoricon.c:2172
#define WM_SETCURSOR
Definition: winuser.h:1618
short SHORT
Definition: pedump.c:59
#define MF_BYPOSITION
Definition: winuser.h:203
BOOL IsDefaultValue(HWND hwndLV, int i)
Definition: listview.c:107
HWND WINAPI GetCapture(void)
Definition: message.c:2880
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define TREE_WINDOW
Definition: main.h:27
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
#define CW_USEDEFAULT
Definition: winuser.h:225
#define GWLP_USERDATA
Definition: treelist.c:63
static void draw_splitbar(HWND hWnd, int x)
Definition: childwnd.c:90
int _snwprintf(wchar_t *buffer, size_t count, const wchar_t *format,...)
smooth NULL
Definition: ftsmooth.c:416
_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:426
#define WM_KEYDOWN
Definition: winuser.h:1697
#define MF_SEPARATOR
Definition: winuser.h:137
WCHAR Suggestions[256]
Definition: childwnd.c:27
LONG_PTR LPARAM
Definition: windef.h:208
#define SPLIT_MIN
Definition: main.h:31
#define LVNI_FOCUSED
Definition: commctrl.h:2419
#define ID_EDIT_RENAME
Definition: resource.h:61
LPCWSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY *phRootKey)
Definition: treeview.c:83
#define WM_DESTROY
Definition: winuser.h:1591
HTREEITEM hItem
Definition: commctrl.h:3517
#define MIIM_ID
Definition: winuser.h:717
#define WM_RBUTTONDOWN
Definition: winuser.h:1761
#define GetMenuItemInfo
Definition: winuser.h:5763
HBRUSH WINAPI CreatePatternBrush(_In_ HBITMAP)
#define SetMenuItemInfo
Definition: winuser.h:5825
BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result)
Definition: listview.c:543
WCHAR szPath[MAX_PATH]
Definition: main.h:69
#define ID_TREE_SUGGESTION_MAX
Definition: resource.h:160
#define COUNT_OF(a)
Definition: main.h:33
static VOID DestroyTreeView(HWND hTreeView)
#define TreeView_GetSelection(hwnd)
Definition: commctrl.h:3469
#define AppendMenu
Definition: winuser.h:5706
#define GetProcessHeap()
Definition: compat.h:404
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define TreeView_HitTest(hwnd, lpht)
Definition: commctrl.h:3509
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define WM_SIZE
Definition: winuser.h:1593
static int last_split
Definition: childwnd.c:24
HMENU hPopupMenus
Definition: main.c:33
void DestroyMainMenu()
Definition: main.c:157
HWND hWnd
Definition: main.h:60
#define WM_TIMER
Definition: winuser.h:1724
#define MF_ENABLED
Definition: winuser.h:128
#define IDI_ARROW
Definition: resource.h:37
#define MAX_PATH
Definition: compat.h:26
#define PM_TREECONTEXT
Definition: main.h:37
#define WM_KEYUP
Definition: winuser.h:1698
unsigned short WORD
Definition: ntddk_ex.h:93
#define BN_CLICKED
Definition: winuser.h:1907
unsigned long DWORD
Definition: ntddk_ex.h:95
#define IDS_MY_COMPUTER
Definition: resource.h:132
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2074
#define SIZE_MINIMIZED
Definition: winuser.h:2481
HWND CreateTreeView(HWND hwndParent, LPWSTR pHostName, HMENU id)
Definition: treeview.c:738
HWND hAddressBtnWnd
Definition: main.h:64
#define DEFAULT_GUI_FONT
Definition: wingdi.h:908
HICON hArrowIcon
Definition: main.h:65
void ResizeWnd(int cx, int cy)
Definition: childwnd.c:41
#define BS_ICON
Definition: winuser.h:264
static const WCHAR L[]
Definition: oid.c:1250
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)
HDC hdc
Definition: main.c:9
#define MFS_GRAYED
Definition: winuser.h:746
GLdouble s
Definition: gl.h:2039
#define TreeView_GetParent(hwnd, hitem)
Definition: commctrl.h:3465
#define WS_TABSTOP
Definition: pedump.c:634
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define WM_COMMAND
Definition: winuser.h:1722
uint32_t DWORD_PTR
Definition: typedefs.h:64
#define BS_VCENTER
Definition: winuser.h:279
#define LVM_GETITEMRECT
Definition: commctrl.h:2473
#define GWLP_WNDPROC
Definition: treelist.c:66
#define TVIS_EXPANDED
Definition: commctrl.h:3280
#define BS_FLAT
Definition: winuser.h:280
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2881
#define ID_EDIT_MODIFY
Definition: resource.h:65
#define MIIM_STRING
Definition: winuser.h:722
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HWND hFrameWnd
Definition: main.c:30
HWND WINAPI SetCapture(_In_ HWND hWnd)
#define LVIR_BOUNDS
Definition: commctrl.h:2468
HINSTANCE hInst
Definition: dxdiag.c:13
static ATOM item
Definition: dde.c:856
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define TreeView_SelectItem(hwnd, hitem)
Definition: commctrl.h:3477
BOOL WINAPI RemoveMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_LBUTTONUP
Definition: winuser.h:1759
#define PM_NEW
Definition: main.h:36
#define ID_TREE_EXPANDBRANCH
Definition: resource.h:96
#define min(a, b)
Definition: monoChain.cc:55
#define WM_MOUSEMOVE
Definition: winuser.h:1757
BOOL CreateListView(PMAIN_WND_INFO Info)
Definition: listview.c:355
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
BOOL WINAPI SetMenuDefaultItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define WM_SETFONT
Definition: winuser.h:1632
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
#define IDC_ARROW
Definition: winuser.h:682
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2889
HWND hAddressBarWnd
Definition: main.h:63
Definition: main.h:58
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_CREATE
Definition: winuser.h:1590
#define LIST_WINDOW
Definition: main.h:28
#define HIWORD(l)
Definition: typedefs.h:246
LONG bottom
Definition: windef.h:309
#define TVIF_STATE
Definition: commctrl.h:3265
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define GetWindowLongPtr
Definition: treelist.c:73
#define WM_SETFOCUS
Definition: winuser.h:1595
#define MF_GRAYED
Definition: winuser.h:129
#define HTCLIENT
Definition: winuser.h:2450
WCHAR * LPWSTR
Definition: xmlstorage.h:184
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)
#define IDS_COLLAPSE
Definition: resource.h:191
#define IDS_EXPAND
Definition: resource.h:190
#define TVHT_ONITEM
Definition: commctrl.h:3523
Arabic default style
Definition: afstyles.h:93
#define WS_VISIBLE
Definition: pedump.c:620
#define ID_EDIT_MODIFY_BIN
Definition: resource.h:125
#define memset(x, y, z)
Definition: compat.h:39
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
LPARAM lParam
Definition: combotst.c:139
BOOL WINAPI TrackPopupMenu(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _Reserved_ int, _In_ HWND, _Reserved_ LPCRECT)
#define LOWORD(l)
Definition: pedump.c:82
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define HeapFree(x, y, z)
Definition: compat.h:403
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define TreeView_GetItem(hwnd, pitem)
Definition: commctrl.h:3486
#define WM_NOTIFY
Definition: richedit.h:61
#define InsertMenuItem
Definition: winuser.h:5779
int nFocusPanel
Definition: main.h:66
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
HBRUSH SizingBrush
Definition: childwnd.c:26

Referenced by InitInstance().

◆ draw_splitbar()

static void draw_splitbar ( HWND  hWnd,
int  x 
)
static

Definition at line 90 of file childwnd.c.

91 {
92  RECT rt;
93  HGDIOBJ OldObj;
94  HDC hdc = GetDC(hWnd);
95 
96  if(!SizingPattern)
97  {
98  const DWORD Pattern[4] = {0x5555AAAA, 0x5555AAAA, 0x5555AAAA, 0x5555AAAA};
99  SizingPattern = CreateBitmap(8, 8, 1, 1, Pattern);
100  }
101  if(!SizingBrush)
102  {
104  }
105  GetClientRect(hWnd, &rt);
106  rt.left = x - SPLIT_WIDTH/2;
107  rt.right = x + SPLIT_WIDTH/2+1;
108  OldObj = SelectObject(hdc, SizingBrush);
109  PatBlt(hdc, rt.left, rt.top, rt.right - rt.left, rt.bottom - rt.top, PATINVERT);
110  SelectObject(hdc, OldObj);
111  ReleaseDC(hWnd, hdc);
112 }
#define PATINVERT
Definition: wingdi.h:327
HDC WINAPI GetDC(_In_opt_ HWND)
static HDC
Definition: imagelist.c:92
HWND hWnd
Definition: settings.c:17
LONG top
Definition: windef.h:307
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
LONG left
Definition: windef.h:306
LONG right
Definition: windef.h:308
#define SPLIT_WIDTH
Definition: eventvwr.c:62
HBITMAP SizingPattern
Definition: childwnd.c:25
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HBRUSH WINAPI CreatePatternBrush(_In_ HBITMAP)
unsigned long DWORD
Definition: ntddk_ex.h:95
HDC hdc
Definition: main.c:9
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
LONG bottom
Definition: windef.h:309
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
HBRUSH SizingBrush
Definition: childwnd.c:26

Referenced by ChildWndProc(), and finish_splitbar().

◆ finish_splitbar()

static void finish_splitbar ( HWND  hWnd,
int  x 
)
static

Definition at line 120 of file childwnd.c.

121 {
122  RECT rt;
123 
125  last_split = -1;
126  GetClientRect(hWnd, &rt);
128  ResizeWnd(rt.right, rt.bottom);
129  ReleaseCapture();
130 }
ChildWnd * g_pChildWnd
Definition: childwnd.c:23
HWND hWnd
Definition: settings.c:17
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
LONG right
Definition: windef.h:308
int nSplitPos
Definition: main.h:67
static void draw_splitbar(HWND hWnd, int x)
Definition: childwnd.c:90
static int last_split
Definition: childwnd.c:24
void ResizeWnd(int cx, int cy)
Definition: childwnd.c:41
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2889
LONG bottom
Definition: windef.h:309

Referenced by ChildWndProc().

◆ get_root_key_name()

LPCWSTR get_root_key_name ( HKEY  hRootKey)

Definition at line 29 of file childwnd.c.

30 {
31  if (hRootKey == HKEY_CLASSES_ROOT) return L"HKEY_CLASSES_ROOT";
32  if (hRootKey == HKEY_CURRENT_USER) return L"HKEY_CURRENT_USER";
33  if (hRootKey == HKEY_LOCAL_MACHINE) return L"HKEY_LOCAL_MACHINE";
34  if (hRootKey == HKEY_USERS) return L"HKEY_USERS";
35  if (hRootKey == HKEY_CURRENT_CONFIG) return L"HKEY_CURRENT_CONFIG";
36  if (hRootKey == HKEY_DYN_DATA) return L"HKEY_DYN_DATA";
37 
38  return L"UNKNOWN HKEY, PLEASE REPORT";
39 }
#define HKEY_USERS
Definition: winreg.h:13
#define HKEY_CURRENT_USER
Definition: winreg.h:11
#define HKEY_DYN_DATA
Definition: winreg.h:16
#define HKEY_CURRENT_CONFIG
Definition: winreg.h:15
static const WCHAR L[]
Definition: oid.c:1250
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

Referenced by SaveSettings(), and UpdateAddress().

◆ ResizeWnd()

void ResizeWnd ( int  cx,
int  cy 
)

Definition at line 41 of file childwnd.c.

42 {
43  HDWP hdwp = BeginDeferWindowPos(4);
44  RECT rt, rs, rb;
45  const int nButtonWidth = 44;
46  const int nButtonHeight = 22;
47  int cyEdge = GetSystemMetrics(SM_CYEDGE);
49  SetRect(&rt, 0, 0, cx, cy);
50  cy = 0;
51  if (hStatusBar != NULL)
52  {
54  cy = rs.bottom - rs.top;
55  }
58  if (hdwp)
60  rt.left, rt.top,
61  rt.right - rt.left - nButtonWidth, nButtonHeight,
62  uFlags);
63  if (hdwp)
65  rt.right - nButtonWidth, rt.top,
66  nButtonWidth, nButtonHeight,
67  uFlags);
68  if (hdwp)
69  hdwp = DeferWindowPos(hdwp, g_pChildWnd->hTreeWnd, NULL,
70  rt.left,
71  rt.top + nButtonHeight + cyEdge,
73  rt.bottom - rt.top - cy - 2 * cyEdge,
74  uFlags);
75  if (hdwp)
76  hdwp = DeferWindowPos(hdwp, g_pChildWnd->hListWnd, NULL,
77  rt.left + cx,
78  rt.top + nButtonHeight + cyEdge,
79  rt.right - cx,
80  rt.bottom - rt.top - cy - 2 * cyEdge,
81  uFlags);
82  if (hdwp)
83  EndDeferWindowPos(hdwp);
84 }
HDWP WINAPI BeginDeferWindowPos(_In_ int)
ChildWnd * g_pChildWnd
Definition: childwnd.c:23
HWND hTreeWnd
Definition: main.h:61
HWND hListWnd
Definition: main.h:62
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
#define SWP_NOZORDER
Definition: winuser.h:1232
UINT uFlags
Definition: api.c:59
LONG right
Definition: windef.h:308
#define SPLIT_WIDTH
Definition: eventvwr.c:62
int nSplitPos
Definition: main.h:67
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:581
smooth NULL
Definition: ftsmooth.c:416
#define SM_CYEDGE
Definition: winuser.h:999
HDWP WINAPI DeferWindowPos(_In_ HDWP, _In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SWP_NOACTIVATE
Definition: winuser.h:1227
int WINAPI GetSystemMetrics(_In_ int)
HWND hStatusBar
Definition: main.cpp:35
HWND hAddressBtnWnd
Definition: main.h:64
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
unsigned int UINT
Definition: ndis.h:50
_Out_opt_ int * cx
Definition: commctrl.h:581
HWND hAddressBarWnd
Definition: main.h:63
LONG bottom
Definition: windef.h:309
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)

Referenced by ChildWndProc(), and finish_splitbar().

◆ SuggestKeys()

static void SuggestKeys ( HKEY  hRootKey,
LPCWSTR  pszKeyPath,
LPWSTR  pszSuggestions,
size_t  iSuggestionsLength 
)
static

Definition at line 139 of file childwnd.c.

141 {
142  WCHAR szBuffer[256];
143  WCHAR szLastFound[256];
144  size_t i;
145  HKEY hOtherKey, hSubKey;
146  BOOL bFound;
147 
148  memset(pszSuggestions, 0, iSuggestionsLength * sizeof(*pszSuggestions));
149  iSuggestionsLength--;
150 
151  /* Are we a root key in HKEY_CLASSES_ROOT? */
152  if ((hRootKey == HKEY_CLASSES_ROOT) && pszKeyPath[0] && !wcschr(pszKeyPath, L'\\'))
153  {
154  do
155  {
156  bFound = FALSE;
157 
158  /* Check default key */
159  if (QueryStringValue(hRootKey, pszKeyPath, NULL,
160  szBuffer, COUNT_OF(szBuffer)) == ERROR_SUCCESS)
161  {
162  /* Sanity check this key; it cannot be empty, nor can it be a
163  * loop back */
164  if ((szBuffer[0] != L'\0') && _wcsicmp(szBuffer, pszKeyPath))
165  {
166  if (RegOpenKeyW(hRootKey, szBuffer, &hOtherKey) == ERROR_SUCCESS)
167  {
168  lstrcpynW(pszSuggestions, L"HKCR\\", (int) iSuggestionsLength);
169  i = wcslen(pszSuggestions);
170  pszSuggestions += i;
171  iSuggestionsLength -= i;
172 
173  lstrcpynW(pszSuggestions, szBuffer, (int) iSuggestionsLength);
174  i = MIN(wcslen(pszSuggestions) + 1, iSuggestionsLength);
175  pszSuggestions += i;
176  iSuggestionsLength -= i;
177  RegCloseKey(hOtherKey);
178 
179  bFound = TRUE;
180  wcscpy(szLastFound, szBuffer);
181  pszKeyPath = szLastFound;
182  }
183  }
184  }
185  }
186  while(bFound && (iSuggestionsLength > 0));
187 
188  /* Check CLSID key */
189  if (RegOpenKeyW(hRootKey, pszKeyPath, &hSubKey) == ERROR_SUCCESS)
190  {
191  if (QueryStringValue(hSubKey, L"CLSID", NULL, szBuffer,
192  COUNT_OF(szBuffer)) == ERROR_SUCCESS)
193  {
194  lstrcpynW(pszSuggestions, L"HKCR\\CLSID\\", (int)iSuggestionsLength);
195  i = wcslen(pszSuggestions);
196  pszSuggestions += i;
197  iSuggestionsLength -= i;
198 
199  lstrcpynW(pszSuggestions, szBuffer, (int)iSuggestionsLength);
200  i = MIN(wcslen(pszSuggestions) + 1, iSuggestionsLength);
201  pszSuggestions += i;
202  iSuggestionsLength -= i;
203  }
204  RegCloseKey(hSubKey);
205  }
206  }
207 }
#define TRUE
Definition: types.h:120
#define ERROR_SUCCESS
Definition: deptool.c:10
#define lstrcpynW
Definition: compat.h:406
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
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned int BOOL
Definition: ntddk_ex.h:94
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3296
smooth NULL
Definition: ftsmooth.c:416
#define MIN(a, b)
Definition: childwnd.c:137
#define COUNT_OF(a)
Definition: main.h:33
_CONST_RETURN wchar_t *__cdecl wcschr(_In_z_ const wchar_t *_Str, wchar_t _Ch)
__wchar_t WCHAR
Definition: xmlstorage.h:180
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
static const WCHAR L[]
Definition: oid.c:1250
LONG QueryStringValue(HKEY hKey, LPCTSTR lpSubKey, LPCTSTR lpValueName, LPTSTR pszBuffer, DWORD dwBufferLen)
Definition: settings.c:19
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
#define memset(x, y, z)
Definition: compat.h:39
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)

Referenced by ChildWndProc().

◆ UpdateAddress()

VOID UpdateAddress ( HTREEITEM  hItem,
HKEY  hRootKey,
LPCWSTR  pszPath 
)

Definition at line 232 of file childwnd.c.

233 {
234  LPCWSTR keyPath, rootName;
235  LPWSTR fullPath;
236  DWORD cbFullPath;
237 
238  /* Wipe the listview, the status bar and the address bar if the root key was selected */
240  {
244  return;
245  }
246 
247  if (pszPath == NULL)
248  keyPath = GetItemPath(g_pChildWnd->hTreeWnd, hItem, &hRootKey);
249  else
250  keyPath = pszPath;
251 
252  if (keyPath)
253  {
254  RefreshListView(g_pChildWnd->hListWnd, hRootKey, keyPath);
255  rootName = get_root_key_name(hRootKey);
256  cbFullPath = (wcslen(rootName) + 1 + wcslen(keyPath) + 1) * sizeof(WCHAR);
257  fullPath = HeapAlloc(GetProcessHeap(), 0, cbFullPath);
258  if (fullPath)
259  {
260  /* set (correct) the address bar text */
261  if (keyPath[0] != L'\0')
262  swprintf(fullPath, L"%s%s%s", rootName, keyPath[0]==L'\\'?L"":L"\\", keyPath);
263  else
264  fullPath = wcscpy(fullPath, rootName);
265 
266  SendMessageW(hStatusBar, SB_SETTEXTW, 0, (LPARAM)fullPath);
268  HeapFree(GetProcessHeap(), 0, fullPath);
269 
270  /* disable hive manipulation items temporarily (enable only if necessary) */
273  /* compare the strings to see if we should enable/disable the "Load Hive" menus accordingly */
274  if (_wcsicmp(rootName, L"HKEY_LOCAL_MACHINE") != 0 ||
275  _wcsicmp(rootName, L"HKEY_USERS") != 0)
276  {
277  /*
278  * enable the unload menu item if at the root, otherwise
279  * enable the load menu item if there is no slash in
280  * keyPath (ie. immediate child selected)
281  */
282  if (keyPath[0] == UNICODE_NULL)
284  else if (!wcschr(keyPath, L'\\'))
286  }
287  }
288  }
289 }
ChildWnd * g_pChildWnd
Definition: childwnd.c:23
#define MF_BYCOMMAND
Definition: winuser.h:202
#define ID_REGISTRY_LOADHIVE
Definition: resource.h:107
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
HWND hTreeWnd
Definition: main.h:61
HWND hListWnd
Definition: main.h:62
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define UNICODE_NULL
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
LPCWSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY *phRootKey)
Definition: treeview.c:83
#define WM_SETTEXT
Definition: winuser.h:1599
#define GetProcessHeap()
Definition: compat.h:404
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
_CONST_RETURN wchar_t *__cdecl wcschr(_In_z_ const wchar_t *_Str, wchar_t _Ch)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define ID_REGISTRY_UNLOADHIVE
Definition: resource.h:108
#define MF_ENABLED
Definition: winuser.h:128
#define swprintf(buf, format,...)
Definition: sprintf.c:56
unsigned long DWORD
Definition: ntddk_ex.h:95
HWND hStatusBar
Definition: main.cpp:35
#define SB_SETTEXTW
Definition: commctrl.h:1938
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
static const WCHAR L[]
Definition: oid.c:1250
BOOL RefreshListView(HWND hwndLV, HKEY hKey, LPCWSTR keyPath)
Definition: listview.c:670
#define TreeView_GetParent(hwnd, hitem)
Definition: commctrl.h:3465
LPCWSTR get_root_key_name(HKEY hRootKey)
Definition: childwnd.c:29
HMENU hMenuFrame
Definition: main.c:32
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HWND hAddressBarWnd
Definition: main.h:63
#define MF_GRAYED
Definition: winuser.h:129
WCHAR * LPWSTR
Definition: xmlstorage.h:184
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define HeapFree(x, y, z)
Definition: compat.h:403
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define ListView_DeleteAllItems(hwnd)
Definition: commctrl.h:2410

Referenced by TreeWndNotifyProc().

Variable Documentation

◆ g_pChildWnd

◆ last_split

int last_split
static

Definition at line 24 of file childwnd.c.

Referenced by ChildWndProc(), and finish_splitbar().

◆ SizingBrush

HBRUSH SizingBrush = 0

Definition at line 26 of file childwnd.c.

Referenced by ChildWndProc(), and draw_splitbar().

◆ SizingPattern

HBITMAP SizingPattern = 0

Definition at line 25 of file childwnd.c.

Referenced by ChildWndProc(), and draw_splitbar().

◆ Suggestions

WCHAR Suggestions[256]

Definition at line 27 of file childwnd.c.

Referenced by _CmdWndProc(), and ChildWndProc().