Author: hbelusca
Date: Fri Oct  5 20:08:16 2012
New Revision: 57490

URL: http://svn.reactos.org/svn/reactos?rev=57490&view=rev
Log:
[REGEDIT]
- Re-number some resource IDs.
- Add key exportation message-box error (thus removing some fwprintf calls).
- Use IDS_MY_COMPUTER localized string instead of hardcoded one.

Modified:
    trunk/reactos/base/applications/regedit/childwnd.c
    trunk/reactos/base/applications/regedit/framewnd.c
    trunk/reactos/base/applications/regedit/lang/bg-BG.rc
    trunk/reactos/base/applications/regedit/lang/cs-CZ.rc
    trunk/reactos/base/applications/regedit/lang/de-DE.rc
    trunk/reactos/base/applications/regedit/lang/el-GR.rc
    trunk/reactos/base/applications/regedit/lang/en-US.rc
    trunk/reactos/base/applications/regedit/lang/es-ES.rc
    trunk/reactos/base/applications/regedit/lang/fr-FR.rc
    trunk/reactos/base/applications/regedit/lang/hu-HU.rc
    trunk/reactos/base/applications/regedit/lang/id-ID.rc
    trunk/reactos/base/applications/regedit/lang/it-IT.rc
    trunk/reactos/base/applications/regedit/lang/ja-JP.rc
    trunk/reactos/base/applications/regedit/lang/ko-KR.rc
    trunk/reactos/base/applications/regedit/lang/nl-NL.rc
    trunk/reactos/base/applications/regedit/lang/no-NO.rc
    trunk/reactos/base/applications/regedit/lang/pl-PL.rc
    trunk/reactos/base/applications/regedit/lang/pt-BR.rc
    trunk/reactos/base/applications/regedit/lang/pt-PT.rc
    trunk/reactos/base/applications/regedit/lang/ro-RO.rc
    trunk/reactos/base/applications/regedit/lang/ru-RU.rc
    trunk/reactos/base/applications/regedit/lang/sk-SK.rc
    trunk/reactos/base/applications/regedit/lang/sl-SI.rc
    trunk/reactos/base/applications/regedit/lang/sv-SE.rc
    trunk/reactos/base/applications/regedit/lang/th-TH.rc
    trunk/reactos/base/applications/regedit/lang/uk-UA.rc
    trunk/reactos/base/applications/regedit/lang/zh-CN.rc
    trunk/reactos/base/applications/regedit/lang/zh-TW.rc
    trunk/reactos/base/applications/regedit/regedit.c
    trunk/reactos/base/applications/regedit/resource.h
    trunk/reactos/base/applications/regedit/settings.c
    trunk/reactos/base/applications/regedit/treeview.c

Modified: trunk/reactos/base/applications/regedit/childwnd.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/childwnd.c?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/childwnd.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/regedit/childwnd.c [iso-8859-1] Fri Oct  5 
20:08:16 2012
@@ -325,7 +325,8 @@
         WNDPROC oldproc;
         HFONT hFont;
         WCHAR buffer[MAX_PATH];
-        /* load "My Computer" string */
+
+        /* Load "My Computer" string */
         LoadStringW(hInst, IDS_MY_COMPUTER, buffer, COUNT_OF(buffer));
 
         g_pChildWnd = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 
sizeof(ChildWnd));

Modified: trunk/reactos/base/applications/regedit/framewnd.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/framewnd.c?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/framewnd.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/regedit/framewnd.c [iso-8859-1] Fri Oct  5 
20:08:16 2012
@@ -85,8 +85,7 @@
     }
     else
     {
-        while(RemoveMenu(hMenu, s_nFavoriteMenuSubPos, MF_BYPOSITION))
-            ;
+        while(RemoveMenu(hMenu, s_nFavoriteMenuSubPos, MF_BYPOSITION)) ;
     }
 
     lResult = RegOpenKeyW(HKEY_CURRENT_USER, s_szFavoritesRegKey, &hKey);
@@ -436,7 +435,7 @@
 {
     BOOL bRet = FALSE;
     OPENFILENAME ofn;
-    WCHAR Caption[128], szTitle[256], szText[256];
+    WCHAR Caption[128], szTitle[512], szText[512];
     HKEY hKeyRoot;
     LPCWSTR pszKeyPath;
 
@@ -455,14 +454,15 @@
             wcsicmp(ofn.lpstrFile + ofn.nFileExtension, L"reg") == 0) /* 
REGEDIT4 or Windows Registry Editor Version 5.00 */
         {
             /* Open the file */
-            FILE *fp = _wfopen(ofn.lpstrFile, L"r");
+            FILE* fp = _wfopen(ofn.lpstrFile, L"r");
 
             /* Import it */
             if (fp == NULL || !import_registry_file(fp))
             {
-                LPSTR p = GetMultiByteString(ofn.lpstrFile);
-                fwprintf(stderr, L"Can't open file \"%s\"\n", p);
-                HeapFree(GetProcessHeap(), 0, p);
+                /* Error opening the file */
+                LoadStringW(hInst, IDS_APP_TITLE, szTitle, COUNT_OF(szTitle));
+                LoadStringW(hInst, IDS_IMPORT_ERROR, szText, COUNT_OF(szText));
+                InfoMessageBox(hWnd, MB_OK | MB_ICONERROR, szTitle, szText, 
ofn.lpstrFile);
                 bRet = FALSE;
             }
             else
@@ -470,7 +470,7 @@
                 /* Show successful import */
                 LoadStringW(hInst, IDS_APP_TITLE, szTitle, COUNT_OF(szTitle));
                 LoadStringW(hInst, IDS_IMPORT_OK, szText, COUNT_OF(szText));
-                MessageBoxW(NULL, szText, szTitle, MB_OK);
+                InfoMessageBox(hWnd, MB_OK | MB_ICONINFORMATION, szTitle, 
szText, ofn.lpstrFile);
                 bRet = TRUE;
             }
 
@@ -582,7 +582,7 @@
     BOOL bRet = FALSE;
     OPENFILENAME ofn;
     WCHAR ExportKeyPath[_MAX_PATH];
-    WCHAR Caption[128];
+    WCHAR Caption[128], szTitle[512], szText[512];
     HKEY hKeyRoot;
     LPCWSTR pszKeyPath;
 
@@ -664,9 +664,10 @@
                                          (ofn.nFilterIndex == 3 ? REG_FORMAT_4
                                                                 : 
REG_FORMAT_5)))
                 {
-                    LPSTR p = GetMultiByteString(ofn.lpstrFile);
-                    fwprintf(stderr, L"Can't open file \"%s\"\n", p);
-                    HeapFree(GetProcessHeap(), 0, p);
+                    /* Error creating the file */
+                    LoadStringW(hInst, IDS_APP_TITLE, szTitle, 
COUNT_OF(szTitle));
+                    LoadStringW(hInst, IDS_EXPORT_ERROR, szText, 
COUNT_OF(szText));
+                    InfoMessageBox(hWnd, MB_OK | MB_ICONERROR, szTitle, 
szText, ofn.lpstrFile);
                     bRet = FALSE;
                 }
                 else

Modified: trunk/reactos/base/applications/regedit/lang/bg-BG.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/bg-BG.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/bg-BG.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/bg-BG.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -452,6 +452,7 @@
   IDS_IMPORT_PROMPT              "Adding information can unintentionally 
change or delete values and cause components to stop working correctly. If you 
do not trust the source of this information in '%1', do not add it to 
registry.\n\nAre you sure you want to continue?"
   IDS_IMPORT_OK                  "The keys and values contained in '%1' have 
been successfully added to the registry."
   IDS_IMPORT_ERROR               "Cannot import '%1': Error opening the file. 
There may be a disk, file system error or file may not exist."
+  IDS_EXPORT_ERROR               "Cannot export '%1': Error creating or 
writing to the file. There may be a disk or file system error."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/lang/cs-CZ.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/cs-CZ.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/cs-CZ.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/cs-CZ.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -437,6 +437,7 @@
   IDS_IMPORT_PROMPT              "Adding information can unintentionally 
change or delete values and cause components to stop working correctly. If you 
do not trust the source of this information in '%1', do not add it to 
registry.\n\nAre you sure you want to continue?"
   IDS_IMPORT_OK                  "The keys and values contained in '%1' have 
been successfully added to the registry."
   IDS_IMPORT_ERROR               "Cannot import '%1': Error opening the file. 
There may be a disk, file system error or file may not exist."
+  IDS_EXPORT_ERROR               "Cannot export '%1': Error creating or 
writing to the file. There may be a disk or file system error."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/lang/de-DE.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/de-DE.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/de-DE.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/de-DE.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -437,6 +437,7 @@
   IDS_IMPORT_PROMPT              "Adding information can unintentionally 
change or delete values and cause components to stop working correctly. If you 
do not trust the source of this information in '%1', do not add it to 
registry.\n\nAre you sure you want to continue?"
   IDS_IMPORT_OK                  "The keys and values contained in '%1' have 
been successfully added to the registry."
   IDS_IMPORT_ERROR               "Cannot import '%1': Error opening the file. 
There may be a disk, file system error or file may not exist."
+  IDS_EXPORT_ERROR               "Cannot export '%1': Error creating or 
writing to the file. There may be a disk or file system error."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/lang/el-GR.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/el-GR.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/el-GR.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/el-GR.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -437,6 +437,7 @@
   IDS_IMPORT_PROMPT              "Adding information can unintentionally 
change or delete values and cause components to stop working correctly. If you 
do not trust the source of this information in '%1', do not add it to 
registry.\n\nAre you sure you want to continue?"
   IDS_IMPORT_OK                  "The keys and values contained in '%1' have 
been successfully added to the registry."
   IDS_IMPORT_ERROR               "Cannot import '%1': Error opening the file. 
There may be a disk, file system error or file may not exist."
+  IDS_EXPORT_ERROR               "Cannot export '%1': Error creating or 
writing to the file. There may be a disk or file system error."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/lang/en-US.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/en-US.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/en-US.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/en-US.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -437,6 +437,7 @@
   IDS_IMPORT_PROMPT              "Adding information can unintentionally 
change or delete values and cause components to stop working correctly. If you 
do not trust the source of this information in '%1', do not add it to 
registry.\n\nAre you sure you want to continue?"
   IDS_IMPORT_OK                  "The keys and values contained in '%1' have 
been successfully added to the registry."
   IDS_IMPORT_ERROR               "Cannot import '%1': Error opening the file. 
There may be a disk, file system error or file may not exist."
+  IDS_EXPORT_ERROR               "Cannot export '%1': Error creating or 
writing to the file. There may be a disk or file system error."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/lang/es-ES.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/es-ES.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/es-ES.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/es-ES.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -440,6 +440,7 @@
   IDS_IMPORT_PROMPT              "Adding information can unintentionally 
change or delete values and cause components to stop working correctly. If you 
do not trust the source of this information in '%1', do not add it to 
registry.\n\nAre you sure you want to continue?"
   IDS_IMPORT_OK                  "The keys and values contained in '%1' have 
been successfully added to the registry."
   IDS_IMPORT_ERROR               "Cannot import '%1': Error opening the file. 
There may be a disk, file system error or file may not exist."
+  IDS_EXPORT_ERROR               "Cannot export '%1': Error creating or 
writing to the file. There may be a disk or file system error."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/lang/fr-FR.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/fr-FR.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/fr-FR.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/fr-FR.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -432,7 +432,8 @@
 BEGIN
   IDS_IMPORT_PROMPT              "L'ajout d'informations peut involontairement 
modifier ou supprimer des valeurs et endommager le fonctionnement de 
composants. Si vous n'êtes pas sûr de la source de ces informations dans 
'%1', ne les ajoutez pas au Registre.\n\nÊtes-vous sûr de vouloir continuer ?"
   IDS_IMPORT_OK                  "Les clés et valeurs contenues dans '%1' ont 
été correctement ajoutées au Registre."
-  IDS_IMPORT_ERROR               "Impossible d’importer '%1' à la suite 
d’une erreur lors de la lecture de ce fichier. Il s’agit d’une erreur 
disque, ou le fichier est endommagé."
+  IDS_IMPORT_ERROR               "Impossible d'importer '%1' à la suite d'une 
erreur lors de la lecture de ce fichier. Il s'agit d'une erreur disque, ou le 
fichier est endommagé."
+  IDS_EXPORT_ERROR               "Impossible d'exporter dans le fichier '%1' 
à la suite d'une erreur lors de sa création ou d'une tentative d'écriture, 
pouvant être due à une erreur de disque ou de système de fichiers."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/lang/hu-HU.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/hu-HU.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/hu-HU.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/hu-HU.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -438,6 +438,7 @@
   IDS_IMPORT_PROMPT              "Adding information can unintentionally 
change or delete values and cause components to stop working correctly. If you 
do not trust the source of this information in '%1', do not add it to 
registry.\n\nAre you sure you want to continue?"
   IDS_IMPORT_OK                  "The keys and values contained in '%1' have 
been successfully added to the registry."
   IDS_IMPORT_ERROR               "Cannot import '%1': Error opening the file. 
There may be a disk, file system error or file may not exist."
+  IDS_EXPORT_ERROR               "Cannot export '%1': Error creating or 
writing to the file. There may be a disk or file system error."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/lang/id-ID.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/id-ID.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/id-ID.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/id-ID.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -436,6 +436,7 @@
   IDS_IMPORT_PROMPT              "Adding information can unintentionally 
change or delete values and cause components to stop working correctly. If you 
do not trust the source of this information in '%1', do not add it to 
registry.\n\nAre you sure you want to continue?"
   IDS_IMPORT_OK                  "The keys and values contained in '%1' have 
been successfully added to the registry."
   IDS_IMPORT_ERROR               "Cannot import '%1': Error opening the file. 
There may be a disk, file system error or file may not exist."
+  IDS_EXPORT_ERROR               "Cannot export '%1': Error creating or 
writing to the file. There may be a disk or file system error."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/lang/it-IT.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/it-IT.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/it-IT.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/it-IT.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -439,6 +439,7 @@
   IDS_IMPORT_PROMPT              "Adding information can unintentionally 
change or delete values and cause components to stop working correctly. If you 
do not trust the source of this information in '%1', do not add it to 
registry.\n\nAre you sure you want to continue?"
   IDS_IMPORT_OK                  "The keys and values contained in '%1' have 
been successfully added to the registry."
   IDS_IMPORT_ERROR               "Cannot import '%1': Error opening the file. 
There may be a disk, file system error or file may not exist."
+  IDS_EXPORT_ERROR               "Cannot export '%1': Error creating or 
writing to the file. There may be a disk or file system error."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/lang/ja-JP.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/ja-JP.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/ja-JP.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/ja-JP.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -437,6 +437,7 @@
   IDS_IMPORT_PROMPT              "Adding information can unintentionally 
change or delete values and cause components to stop working correctly. If you 
do not trust the source of this information in '%1', do not add it to 
registry.\n\nAre you sure you want to continue?"
   IDS_IMPORT_OK                  "The keys and values contained in '%1' have 
been successfully added to the registry."
   IDS_IMPORT_ERROR               "Cannot import '%1': Error opening the file. 
There may be a disk, file system error or file may not exist."
+  IDS_EXPORT_ERROR               "Cannot export '%1': Error creating or 
writing to the file. There may be a disk or file system error."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/lang/ko-KR.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/ko-KR.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/ko-KR.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/ko-KR.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -422,6 +422,7 @@
   IDS_IMPORT_PROMPT              "Adding information can unintentionally 
change or delete values and cause components to stop working correctly. If you 
do not trust the source of this information in '%1', do not add it to 
registry.\n\nAre you sure you want to continue?"
   IDS_IMPORT_OK                  "The keys and values contained in '%1' have 
been successfully added to the registry."
   IDS_IMPORT_ERROR               "Cannot import '%1': Error opening the file. 
There may be a disk, file system error or file may not exist."
+  IDS_EXPORT_ERROR               "Cannot export '%1': Error creating or 
writing to the file. There may be a disk or file system error."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/lang/nl-NL.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/nl-NL.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/nl-NL.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/nl-NL.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -437,6 +437,7 @@
   IDS_IMPORT_PROMPT              "Adding information can unintentionally 
change or delete values and cause components to stop working correctly. If you 
do not trust the source of this information in '%1', do not add it to 
registry.\n\nAre you sure you want to continue?"
   IDS_IMPORT_OK                  "The keys and values contained in '%1' have 
been successfully added to the registry."
   IDS_IMPORT_ERROR               "Cannot import '%1': Error opening the file. 
There may be a disk, file system error or file may not exist."
+  IDS_EXPORT_ERROR               "Cannot export '%1': Error creating or 
writing to the file. There may be a disk or file system error."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/lang/no-NO.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/no-NO.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/no-NO.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/no-NO.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -437,6 +437,7 @@
   IDS_IMPORT_PROMPT              "Adding information can unintentionally 
change or delete values and cause components to stop working correctly. If you 
do not trust the source of this information in '%1', do not add it to 
registry.\n\nAre you sure you want to continue?"
   IDS_IMPORT_OK                  "The keys and values contained in '%1' have 
been successfully added to the registry."
   IDS_IMPORT_ERROR               "Cannot import '%1': Error opening the file. 
There may be a disk, file system error or file may not exist."
+  IDS_EXPORT_ERROR               "Cannot export '%1': Error creating or 
writing to the file. There may be a disk or file system error."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/lang/pl-PL.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/pl-PL.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/pl-PL.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/pl-PL.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -444,6 +444,7 @@
   IDS_IMPORT_PROMPT              "Adding information can unintentionally 
change or delete values and cause components to stop working correctly. If you 
do not trust the source of this information in '%1', do not add it to 
registry.\n\nAre you sure you want to continue?"
   IDS_IMPORT_OK                  "The keys and values contained in '%1' have 
been successfully added to the registry."
   IDS_IMPORT_ERROR               "Cannot import '%1': Error opening the file. 
There may be a disk, file system error or file may not exist."
+  IDS_EXPORT_ERROR               "Cannot export '%1': Error creating or 
writing to the file. There may be a disk or file system error."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/lang/pt-BR.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/pt-BR.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/pt-BR.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/pt-BR.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -438,6 +438,7 @@
   IDS_IMPORT_PROMPT              "Adding information can unintentionally 
change or delete values and cause components to stop working correctly. If you 
do not trust the source of this information in '%1', do not add it to 
registry.\n\nAre you sure you want to continue?"
   IDS_IMPORT_OK                  "The keys and values contained in '%1' have 
been successfully added to the registry."
   IDS_IMPORT_ERROR               "Cannot import '%1': Error opening the file. 
There may be a disk, file system error or file may not exist."
+  IDS_EXPORT_ERROR               "Cannot export '%1': Error creating or 
writing to the file. There may be a disk or file system error."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/lang/pt-PT.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/pt-PT.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/pt-PT.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/pt-PT.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -439,6 +439,7 @@
   IDS_IMPORT_PROMPT              "Adding information can unintentionally 
change or delete values and cause components to stop working correctly. If you 
do not trust the source of this information in '%1', do not add it to 
registry.\n\nAre you sure you want to continue?"
   IDS_IMPORT_OK                  "The keys and values contained in '%1' have 
been successfully added to the registry."
   IDS_IMPORT_ERROR               "Cannot import '%1': Error opening the file. 
There may be a disk, file system error or file may not exist."
+  IDS_EXPORT_ERROR               "Cannot export '%1': Error creating or 
writing to the file. There may be a disk or file system error."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/lang/ro-RO.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/ro-RO.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/ro-RO.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/ro-RO.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -435,6 +435,7 @@
   IDS_IMPORT_PROMPT              "Adding information can unintentionally 
change or delete values and cause components to stop working correctly. If you 
do not trust the source of this information in '%1', do not add it to 
registry.\n\nAre you sure you want to continue?"
   IDS_IMPORT_OK                  "The keys and values contained in '%1' have 
been successfully added to the registry."
   IDS_IMPORT_ERROR               "Cannot import '%1': Error opening the file. 
There may be a disk, file system error or file may not exist."
+  IDS_EXPORT_ERROR               "Cannot export '%1': Error creating or 
writing to the file. There may be a disk or file system error."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/lang/ru-RU.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/ru-RU.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/ru-RU.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/ru-RU.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -434,6 +434,7 @@
   IDS_IMPORT_PROMPT              "Adding information can unintentionally 
change or delete values and cause components to stop working correctly. If you 
do not trust the source of this information in '%1', do not add it to 
registry.\n\nAre you sure you want to continue?"
   IDS_IMPORT_OK                  "The keys and values contained in '%1' have 
been successfully added to the registry."
   IDS_IMPORT_ERROR               "Cannot import '%1': Error opening the file. 
There may be a disk, file system error or file may not exist."
+  IDS_EXPORT_ERROR               "Cannot export '%1': Error creating or 
writing to the file. There may be a disk or file system error."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/lang/sk-SK.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/sk-SK.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/sk-SK.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/sk-SK.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -422,6 +422,7 @@
   IDS_IMPORT_PROMPT              "Adding information can unintentionally 
change or delete values and cause components to stop working correctly. If you 
do not trust the source of this information in '%1', do not add it to 
registry.\n\nAre you sure you want to continue?"
   IDS_IMPORT_OK                  "The keys and values contained in '%1' have 
been successfully added to the registry."
   IDS_IMPORT_ERROR               "Cannot import '%1': Error opening the file. 
There may be a disk, file system error or file may not exist."
+  IDS_EXPORT_ERROR               "Cannot export '%1': Error creating or 
writing to the file. There may be a disk or file system error."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/lang/sl-SI.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/sl-SI.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/sl-SI.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/sl-SI.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -437,6 +437,7 @@
   IDS_IMPORT_PROMPT              "Adding information can unintentionally 
change or delete values and cause components to stop working correctly. If you 
do not trust the source of this information in '%1', do not add it to 
registry.\n\nAre you sure you want to continue?"
   IDS_IMPORT_OK                  "The keys and values contained in '%1' have 
been successfully added to the registry."
   IDS_IMPORT_ERROR               "Cannot import '%1': Error opening the file. 
There may be a disk, file system error or file may not exist."
+  IDS_EXPORT_ERROR               "Cannot export '%1': Error creating or 
writing to the file. There may be a disk or file system error."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/lang/sv-SE.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/sv-SE.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/sv-SE.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/sv-SE.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -437,6 +437,7 @@
   IDS_IMPORT_PROMPT              "Adding information can unintentionally 
change or delete values and cause components to stop working correctly. If you 
do not trust the source of this information in '%1', do not add it to 
registry.\n\nAre you sure you want to continue?"
   IDS_IMPORT_OK                  "The keys and values contained in '%1' have 
been successfully added to the registry."
   IDS_IMPORT_ERROR               "Cannot import '%1': Error opening the file. 
There may be a disk, file system error or file may not exist."
+  IDS_EXPORT_ERROR               "Cannot export '%1': Error creating or 
writing to the file. There may be a disk or file system error."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/lang/th-TH.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/th-TH.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/th-TH.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/th-TH.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -437,6 +437,7 @@
   IDS_IMPORT_PROMPT              "Adding information can unintentionally 
change or delete values and cause components to stop working correctly. If you 
do not trust the source of this information in '%1', do not add it to 
registry.\n\nAre you sure you want to continue?"
   IDS_IMPORT_OK                  "The keys and values contained in '%1' have 
been successfully added to the registry."
   IDS_IMPORT_ERROR               "Cannot import '%1': Error opening the file. 
There may be a disk, file system error or file may not exist."
+  IDS_EXPORT_ERROR               "Cannot export '%1': Error creating or 
writing to the file. There may be a disk or file system error."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/lang/uk-UA.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/uk-UA.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/uk-UA.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/uk-UA.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -438,6 +438,7 @@
   IDS_IMPORT_PROMPT              "Adding information can unintentionally 
change or delete values and cause components to stop working correctly. If you 
do not trust the source of this information in '%1', do not add it to 
registry.\n\nAre you sure you want to continue?"
   IDS_IMPORT_OK                  "The keys and values contained in '%1' have 
been successfully added to the registry."
   IDS_IMPORT_ERROR               "Cannot import '%1': Error opening the file. 
There may be a disk, file system error or file may not exist."
+  IDS_EXPORT_ERROR               "Cannot export '%1': Error creating or 
writing to the file. There may be a disk or file system error."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/lang/zh-CN.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/zh-CN.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/zh-CN.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/zh-CN.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -437,6 +437,7 @@
   IDS_IMPORT_PROMPT              "Adding information can unintentionally 
change or delete values and cause components to stop working correctly. If you 
do not trust the source of this information in '%1', do not add it to 
registry.\n\nAre you sure you want to continue?"
   IDS_IMPORT_OK                  "The keys and values contained in '%1' have 
been successfully added to the registry."
   IDS_IMPORT_ERROR               "Cannot import '%1': Error opening the file. 
There may be a disk, file system error or file may not exist."
+  IDS_EXPORT_ERROR               "Cannot export '%1': Error creating or 
writing to the file. There may be a disk or file system error."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/lang/zh-TW.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/lang/zh-TW.rc?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/lang/zh-TW.rc [iso-8859-1] 
(original)
+++ trunk/reactos/base/applications/regedit/lang/zh-TW.rc [iso-8859-1] Fri Oct  
5 20:08:16 2012
@@ -438,6 +438,7 @@
   IDS_IMPORT_PROMPT              "Adding information can unintentionally 
change or delete values and cause components to stop working correctly. If you 
do not trust the source of this information in '%1', do not add it to 
registry.\n\nAre you sure you want to continue?"
   IDS_IMPORT_OK                  "The keys and values contained in '%1' have 
been successfully added to the registry."
   IDS_IMPORT_ERROR               "Cannot import '%1': Error opening the file. 
There may be a disk, file system error or file may not exist."
+  IDS_EXPORT_ERROR               "Cannot export '%1': Error creating or 
writing to the file. There may be a disk or file system error."
 END
 
 STRINGTABLE DISCARDABLE

Modified: trunk/reactos/base/applications/regedit/regedit.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/regedit.c?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/regedit.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/regedit/regedit.c [iso-8859-1] Fri Oct  5 
20:08:16 2012
@@ -146,9 +146,8 @@
             get_file_name(&s, filename);
             if (!filename[0])
             {
-                fwprintf(stderr, L"%s: No file name is specified\n", 
getAppName());
-                // fwprintf(stderr, usage);
-                MessageBoxW(NULL, usage, NULL, MB_OK | MB_ICONINFORMATION);
+                InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, NULL, L"No 
file name is specified.");
+                InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, NULL, usage);
                 exit(4);
             }
 
@@ -165,34 +164,31 @@
                         goto cont;
                 }
 
+                /* Open the file */
                 fp = _wfopen(filename, L"r");
-                if (fp != NULL)
-                {
-                    import_registry_file(fp);
-
+
+                /* Import it */
+                if (fp == NULL || !import_registry_file(fp))
+                {
+                    /* Error opening the file */
+                    if (!silent)
+                    {
+                        LoadStringW(hInst, IDS_IMPORT_ERROR, szText, 
COUNT_OF(szText));
+                        InfoMessageBox(NULL, MB_OK | MB_ICONERROR, szTitle, 
szText, filename);
+                    }
+                }
+                else
+                {
                     /* Show successful import */
                     if (!silent)
                     {
                         LoadStringW(hInst, IDS_IMPORT_OK, szText, 
COUNT_OF(szText));
                         InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, 
szTitle, szText, filename);
                     }
-
-                    fclose(fp);
-                }
-                else
-                {
-                    //LPSTR p = GetMultiByteString(filename);
-                    //perror("");
-                    fwprintf(stderr, L"%s: Can't open file \"%s\"\n", 
getAppName(), filename /*p*/);
-                    //HeapFree(GetProcessHeap(), 0, p);
-
-                    /* Error opening the file */
-                    if (!silent)
-                    {
-                        LoadStringW(hInst, IDS_IMPORT_ERROR, szText, 
COUNT_OF(szText));
-                        InfoMessageBox(NULL, MB_OK | MB_ICONERROR, szTitle, 
szText, filename);
-                    }
-                }
+                }
+
+                /* Close the file */
+                if (fp) fclose(fp);
 
 cont:
                 get_file_name(&s, filename);
@@ -206,9 +202,8 @@
             get_file_name(&s, reg_key_name);
             if (!reg_key_name[0])
             {
-                fwprintf(stderr, L"%s: No registry key is specified for 
removal\n", getAppName());
-                // fwprintf(stderr, usage);
-                MessageBoxW(NULL, usage, NULL, MB_OK | MB_ICONINFORMATION);
+                InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, NULL, L"No 
registry key is specified for removal.");
+                InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, NULL, usage);
                 exit(6);
             }
             delete_registry_key(reg_key_name);
@@ -223,9 +218,8 @@
             get_file_name(&s, filename);
             if (!filename[0])
             {
-                fwprintf(stderr, L"%s: No file name is specified\n", 
getAppName());
-                // fwprintf(stderr, usage);
-                MessageBoxW(NULL, usage, NULL, MB_OK | MB_ICONINFORMATION);
+                InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, NULL, L"No 
file name is specified.");
+                InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, NULL, usage);
                 exit(7);
             }
 
@@ -310,8 +304,7 @@
                         action = ACTION_EXPORT;
                         break;
                     case L'?':
-                        //fwprintf(stderr, usage);
-                        MessageBoxW(NULL, usage, NULL, MB_OK | 
MB_ICONINFORMATION);
+                        InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, NULL, 
usage);
                         exit(3);
                         break;
                     default:

Modified: trunk/reactos/base/applications/regedit/resource.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/resource.h?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/resource.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/regedit/resource.h [iso-8859-1] Fri Oct  5 
20:08:16 2012
@@ -167,79 +167,80 @@
 #define IDS_FLT_ALLFILES                31007
 #define IDS_FLT_ALLFILES_FLT            31008
 
-#define IDS_ACCESS_FULLCONTROL          31101
-#define IDS_ACCESS_READ                 31102
-#define IDS_ACCESS_QUERYVALUE           31103
-#define IDS_ACCESS_SETVALUE             31104
-#define IDS_ACCESS_CREATESUBKEY         31105
-#define IDS_ACCESS_ENUMERATESUBKEYS     31106
-#define IDS_ACCESS_NOTIFY               31107
-#define IDS_ACCESS_CREATELINK           31108
-#define IDS_ACCESS_DELETE               31109
-#define IDS_ACCESS_WRITEDAC             31110
-#define IDS_ACCESS_WRITEOWNER           31111
-#define IDS_ACCESS_READCONTROL          31112
-
-#define IDS_INHERIT_THISKEYONLY         31121
-#define IDS_INHERIT_THISKEYANDSUBKEYS   31122
-#define IDS_INHERIT_SUBKEYSONLY         31123
-#define IDS_EXPAND                      31124
-#define IDS_COLLAPSE                    31125
-#define IDS_NEW_KEY                     31126
-#define IDS_NEW_VALUE                   31127
-#define IDS_GOTO_SUGGESTED_KEY          31128
-
-#define IDS_IMPORT_PROMPT               31129
-#define IDS_IMPORT_OK                   31130
-#define IDS_IMPORT_ERROR                31131
-
-#define IDS_FINISHEDFIND                31132
-
-#define IDS_BUSNUMBER                   31133
-#define IDS_INTERFACE                   31134
-
-#define IDS_DMA_CHANNEL                 31135
-#define IDS_DMA_PORT                    31136
-#define IDS_INTERRUPT_VECTOR            31137
-#define IDS_INTERRUPT_LEVEL             31138
-#define IDS_INTERRUPT_AFFINITY          31139
-#define IDS_INTERRUPT_TYPE              31140
-#define IDS_MEMORY_ADDRESS              31141
-#define IDS_MEMORY_LENGTH               31142
-#define IDS_MEMORY_ACCESS               31143
-#define IDS_PORT_ADDRESS                31144
-#define IDS_PORT_LENGTH                 31145
-#define IDS_PORT_ACCESS                 31146
-#define IDS_SPECIFIC_RESERVED1          31147
-#define IDS_SPECIFIC_RESERVED2          31148
-#define IDS_SPECIFIC_DATASIZE           31149
-
-#define IDS_PORT_PORT_IO                31150
-#define IDS_PORT_MEMORY_IO              31151
-#define IDS_INTERRUPT_EDGE_SENSITIVE    31152
-#define IDS_INTERRUPT_LEVEL_SENSITIVE   31153
-#define IDS_MEMORY_READ_ONLY            31154
-#define IDS_MEMORY_WRITE_ONLY           31155
-#define IDS_MEMORY_READ_WRITE           31156
-
-#define IDS_BUS_UNDEFINED               31157
-#define IDS_BUS_INTERNAL                31158
-#define IDS_BUS_ISA                     31159
-#define IDS_BUS_EISA                    31160
-#define IDS_BUS_MICROCHANNEL            31161
-#define IDS_BUS_TURBOCHANNEL            31162
-#define IDS_BUS_PCIBUS                  31163
-#define IDS_BUS_VMEBUS                  31164
-#define IDS_BUS_NUBUS                   31165
-#define IDS_BUS_PCMCIABUS               31166
-#define IDS_BUS_CBUS                    31167
-#define IDS_BUS_MPIBUS                  31168
-#define IDS_BUS_MPSABUS                 31169
-#define IDS_BUS_PROCESSORINTERNAL       31170
-#define IDS_BUS_INTERNALPOWERBUS        31171
-#define IDS_BUS_PNPISABUS               31172
-#define IDS_BUS_PNPBUS                  31173
-#define IDS_BUS_UNKNOWNTYPE             31174
+#define IDS_ACCESS_FULLCONTROL          31100
+#define IDS_ACCESS_READ                 31101
+#define IDS_ACCESS_QUERYVALUE           31102
+#define IDS_ACCESS_SETVALUE             31103
+#define IDS_ACCESS_CREATESUBKEY         31104
+#define IDS_ACCESS_ENUMERATESUBKEYS     31105
+#define IDS_ACCESS_NOTIFY               31106
+#define IDS_ACCESS_CREATELINK           31107
+#define IDS_ACCESS_DELETE               31108
+#define IDS_ACCESS_WRITEDAC             31109
+#define IDS_ACCESS_WRITEOWNER           31110
+#define IDS_ACCESS_READCONTROL          31111
+
+#define IDS_INHERIT_THISKEYONLY         31200
+#define IDS_INHERIT_THISKEYANDSUBKEYS   31201
+#define IDS_INHERIT_SUBKEYSONLY         31202
+#define IDS_EXPAND                      31203
+#define IDS_COLLAPSE                    31204
+#define IDS_NEW_KEY                     31205
+#define IDS_NEW_VALUE                   31206
+#define IDS_GOTO_SUGGESTED_KEY          31207
+
+#define IDS_IMPORT_PROMPT               31300
+#define IDS_IMPORT_OK                   31301
+#define IDS_IMPORT_ERROR                31302
+#define IDS_EXPORT_ERROR                31303
+
+#define IDS_FINISHEDFIND                31304
+
+#define IDS_BUSNUMBER                   31400
+#define IDS_INTERFACE                   31401
+
+#define IDS_DMA_CHANNEL                 31500
+#define IDS_DMA_PORT                    31501
+#define IDS_INTERRUPT_VECTOR            31502
+#define IDS_INTERRUPT_LEVEL             31503
+#define IDS_INTERRUPT_AFFINITY          31504
+#define IDS_INTERRUPT_TYPE              31505
+#define IDS_MEMORY_ADDRESS              31506
+#define IDS_MEMORY_LENGTH               31507
+#define IDS_MEMORY_ACCESS               31508
+#define IDS_PORT_ADDRESS                31509
+#define IDS_PORT_LENGTH                 31510
+#define IDS_PORT_ACCESS                 31511
+#define IDS_SPECIFIC_RESERVED1          31512
+#define IDS_SPECIFIC_RESERVED2          31513
+#define IDS_SPECIFIC_DATASIZE           31514
+
+#define IDS_PORT_PORT_IO                31520
+#define IDS_PORT_MEMORY_IO              31521
+#define IDS_INTERRUPT_EDGE_SENSITIVE    31522
+#define IDS_INTERRUPT_LEVEL_SENSITIVE   31523
+#define IDS_MEMORY_READ_ONLY            31524
+#define IDS_MEMORY_WRITE_ONLY           31525
+#define IDS_MEMORY_READ_WRITE           31526
+
+#define IDS_BUS_UNDEFINED               31530
+#define IDS_BUS_INTERNAL                31531
+#define IDS_BUS_ISA                     31532
+#define IDS_BUS_EISA                    31533
+#define IDS_BUS_MICROCHANNEL            31534
+#define IDS_BUS_TURBOCHANNEL            31535
+#define IDS_BUS_PCIBUS                  31536
+#define IDS_BUS_VMEBUS                  31537
+#define IDS_BUS_NUBUS                   31538
+#define IDS_BUS_PCMCIABUS               31539
+#define IDS_BUS_CBUS                    31540
+#define IDS_BUS_MPIBUS                  31541
+#define IDS_BUS_MPSABUS                 31542
+#define IDS_BUS_PROCESSORINTERNAL       31543
+#define IDS_BUS_INTERNALPOWERBUS        31544
+#define IDS_BUS_PNPISABUS               31545
+#define IDS_BUS_PNPBUS                  31546
+#define IDS_BUS_UNKNOWNTYPE             31547
 
 #define IDD_EDIT_STRING                  2000
 #define IDC_VALUE_NAME                   2001

Modified: trunk/reactos/base/applications/regedit/settings.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/settings.c?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/settings.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/regedit/settings.c [iso-8859-1] Fri Oct  5 
20:08:16 2012
@@ -129,8 +129,13 @@
             if (keyPath)
             {
                 rootName = get_root_key_name(hRootKey);
-                _snwprintf(szBuffer, COUNT_OF(szBuffer), L"My 
Computer\\%s\\%s", rootName, keyPath);
-                RegSetValueExW(hKey, L"LastKey", 0, REG_SZ, (LPBYTE) szBuffer, 
(DWORD)wcslen(szBuffer) * sizeof(WCHAR));
+
+                /* Load "My Computer" string and complete it */
+                LoadStringW(hInst, IDS_MY_COMPUTER, szBuffer, 
COUNT_OF(szBuffer));
+                wcscat(szBuffer, L"\\"); wcscat(szBuffer, rootName);
+                wcscat(szBuffer, L"\\"); wcscat(szBuffer, keyPath);
+
+                RegSetValueExW(hKey, L"LastKey", 0, REG_SZ, (LPBYTE)szBuffer, 
(DWORD)wcslen(szBuffer) * sizeof(WCHAR));
             }
 
             /* Get statusbar settings */

Modified: trunk/reactos/base/applications/regedit/treeview.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/treeview.c?rev=57490&r1=57489&r2=57490&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/treeview.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/regedit/treeview.c [iso-8859-1] Fri Oct  5 
20:08:16 2012
@@ -601,9 +601,7 @@
         }
         else if (!hNewKey)
         {
-            WCHAR sz[256];
-            wsprintf(sz, L"Cannot create new key!\n\nError Code: %d", nResult);
-            MessageBoxW(hFrameWnd, sz, NULL, MB_ICONERROR);
+            InfoMessageBox(hFrameWnd, MB_OK | MB_ICONERROR, NULL, L"Cannot 
create new key!\n\nError Code: %d", nResult);
             goto done;
         }
     }
@@ -668,9 +666,16 @@
     LPCWSTR s;
     TVITEM tvi;
 
-    /* Total no-good hack */
-    if (!_wcsnicmp(keyPath, L"My Computer\\", 12))
-        keyPath += 12;
+    /* Load "My Computer" string... */
+    LoadStringW(hInst, IDS_MY_COMPUTER, szBuffer, COUNT_OF(szBuffer));
+    wcscat(szBuffer, L"\\");
+
+    /* ... and remove it from the key path */
+    if (!_wcsnicmp(keyPath, szBuffer, wcslen(szBuffer)))
+        keyPath += wcslen(szBuffer);
+
+    /* Reinitialize szBuffer */
+    szBuffer[0] = L'\0';
 
     hRoot = TreeView_GetRoot(hwndTV);
     hItem = hRoot;


Reply via email to