regedit: expand tree initially

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is from ReactOS tree.

ChangeLog
    weiden@xxxxxxxxxxxx
    Expand the treeview on startup.


Index: programs/regedit/treeview.c
===================================================================
RCS file: /var/cvs/wine/programs/regedit/treeview.c,v
retrieving revision 1.6
diff -u -r1.6 treeview.c
--- programs/regedit/treeview.c	5 Jan 2004 21:14:19 -0000	1.6
+++ programs/regedit/treeview.c	13 Jan 2004 23:27:23 -0000
@@ -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.  */

-- 
Dimi.



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux