Regedit:  Set up the export all/export branch UI; currently disabled for now
Modified: trunk/reactos/subsys/system/regedit/En.rc
Modified: trunk/reactos/subsys/system/regedit/framewnd.c
Modified: trunk/reactos/subsys/system/regedit/resource.h

Modified: trunk/reactos/subsys/system/regedit/En.rc
--- trunk/reactos/subsys/system/regedit/En.rc	2005-09-29 02:50:38 UTC (rev 18148)
+++ trunk/reactos/subsys/system/regedit/En.rc	2005-09-29 03:07:26 UTC (rev 18149)
@@ -349,11 +349,15 @@
  * Dialog
  */
 
-IDD_DIALOG1 DIALOG DISCARDABLE  50, 50, 268, 98
+IDD_EXPORTRANGE DIALOG DISCARDABLE  50, 50, 370, 50
 STYLE DS_3DLOOK | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS |
     WS_BORDER
 FONT 8, "MS Sans Serif"
 BEGIN
+   GROUPBOX "Export Range",IDC_STATIC,2,0,366,48
+   CONTROL "&All",IDC_EXPORT_ALL,"Button",BS_AUTORADIOBUTTON,10,10, 29,11
+   CONTROL "S&elected Branch",IDC_EXPORT_BRANCH,"Button",BS_AUTORADIOBUTTON,10,22, 100,11
+   EDITTEXT IDC_EXPORT_BRANCH_TEXT,30,34,335,12
 END
 
 IDD_DIALOG2 DIALOG DISCARDABLE  0, 0, 187, 95

Modified: trunk/reactos/subsys/system/regedit/framewnd.c
--- trunk/reactos/subsys/system/regedit/framewnd.c	2005-09-29 02:50:38 UTC (rev 18148)
+++ trunk/reactos/subsys/system/regedit/framewnd.c	2005-09-29 03:07:26 UTC (rev 18149)
@@ -183,25 +183,6 @@
     return TRUE;
 }
 
-static UINT_PTR CALLBACK ImportRegistryFile_OFNHookProc(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam)
-{
-    OPENFILENAME* pOpenFileName;
-    OFNOTIFY* pOfNotify;
-
-    switch (uiMsg) {
-    case WM_INITDIALOG:
-        pOpenFileName = (OPENFILENAME*)lParam;
-        break;
-    case WM_NOTIFY:
-        pOfNotify = (OFNOTIFY*)lParam;
-    if (pOfNotify->hdr.code == CDN_INITDONE) {}
-        break;
-    default:
-        break;
-    }
-    return 0L;
-}
-
 #define MAX_CUSTOM_FILTER_SIZE 50
 TCHAR CustomFilterBuffer[MAX_CUSTOM_FILTER_SIZE];
 TCHAR FileNameBuffer[_MAX_PATH];
@@ -311,6 +292,37 @@
 }
 
 
+static UINT_PTR CALLBACK ExportRegistryFile_OFNHookProc(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam)
+{
+    HWND hControl;
+    UINT_PTR iResult = 0;
+
+	switch(uiMsg) {
+	case WM_INITDIALOG:
+        hControl = GetDlgItem(hdlg, IDC_EXPORT_ALL);
+        if (hControl)
+		{
+            EnableWindow(hControl, FALSE);
+            SendMessage(hControl, BM_SETCHECK, BST_CHECKED, 0);
+		}
+
+        hControl = GetDlgItem(hdlg, IDC_EXPORT_BRANCH);
+        if (hControl)
+		{
+            EnableWindow(hControl, FALSE);
+            SendMessage(hControl, BM_SETCHECK, BST_UNCHECKED, 0);
+		}
+
+        hControl = GetDlgItem(hdlg, IDC_EXPORT_BRANCH_TEXT);
+        if (hControl)
+		{
+            EnableWindow(hControl, FALSE);
+		}
+		break;
+    }
+    return iResult;
+}
+
 static BOOL ExportRegistryFile(HWND hWnd)
 {
     OPENFILENAME ofn;
@@ -322,9 +334,9 @@
     LoadString(hInst, IDS_EXPORT_REG_FILE, Caption, sizeof(Caption)/sizeof(TCHAR));
     ofn.lpstrTitle = Caption;
     /*    ofn.lCustData = ;*/
-    ofn.Flags = OFN_ENABLETEMPLATE + OFN_EXPLORER;
-    ofn.lpfnHook = ImportRegistryFile_OFNHookProc;
-    ofn.lpTemplateName = MAKEINTRESOURCE(IDD_DIALOG1);
+    ofn.Flags = OFN_ENABLETEMPLATE | OFN_EXPLORER | OFN_ENABLEHOOK;
+    ofn.lpfnHook = ExportRegistryFile_OFNHookProc;
+    ofn.lpTemplateName = MAKEINTRESOURCE(IDD_EXPORTRANGE);
     if (GetSaveFileName(&ofn)) {
         BOOL result;
         /* FIXME - convert strings to ascii! */

Modified: trunk/reactos/subsys/system/regedit/resource.h
--- trunk/reactos/subsys/system/regedit/resource.h	2005-09-29 02:50:38 UTC (rev 18148)
+++ trunk/reactos/subsys/system/regedit/resource.h	2005-09-29 03:07:26 UTC (rev 18149)
@@ -35,7 +35,7 @@
 #define IDC_REGEDIT                     109
 #define IDC_REGEDIT_FRAME               110
 #define IDR_REGEDIT_MENU                130
-#define IDD_DIALOG1                     131
+#define IDD_EXPORTRANGE                 131
 #define IDI_OPEN_FILE                   132
 #define IDD_DIALOG2                     132
 #define IDI_CLOSED_FILE                 133
@@ -174,4 +174,8 @@
 #define IDD_EDIT_MULTI_STRING		2006
 #define IDD_EDIT_BIN_DATA		2007
 
+#define IDC_EXPORT_ALL          2008
+#define IDC_EXPORT_BRANCH       2009
+#define IDC_EXPORT_BRANCH_TEXT  2010
+
 #define IDC_STATIC                      -1