Expand the treeview on startup.
diff --git a/programs/regedit/treeview.c b/programs/regedit/treeview.c
index 4057e60..c65f1f9 100644
--- a/programs/regedit/treeview.c
+++ b/programs/regedit/treeview.c
@@ -148,7 +148,10 @@
if (!AddEntryToTree(hwndTV, hRoot, _T("HKEY_LOCAL_MACHINE"), HKEY_LOCAL_MACHINE, 1)) return FALSE;
if (!AddEntryToTree(hwndTV, hRoot, _T("HKEY_USERS"), HKEY_USERS, 1)) return FALSE;
if (!AddEntryToTree(hwndTV, hRoot, _T("HKEY_CURRENT_CONFIG"), HKEY_CURRENT_CONFIG, 1)) return FALSE;
-
+
+ /* expand and select host name */
+ TreeView_Expand(hwndTV, hRoot, TVE_EXPAND);
+ TreeView_Select(hwndTV, hRoot, TVGN_CARET);
return TRUE;
}
@@ -259,7 +262,7 @@
/* Get the dimensions of the parent window's client area, and create the tree view control. */
GetClientRect(hwndParent, &rcClient);
hwndTV = CreateWindowEx(WS_EX_CLIENTEDGE, WC_TREEVIEW, _T("Tree View"),
- WS_VISIBLE | WS_CHILD | TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESATROOT,
+ WS_VISIBLE | WS_CHILD | WS_TABSTOP | TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESATROOT,
0, 0, rcClient.right, rcClient.bottom,
hwndParent, (HMENU)id, hInst, NULL);
/* Initialize the image list, and add items to the control. */