https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ed7b0d0bd91c978f920f2…
commit ed7b0d0bd91c978f920f2cdf978cc9778498678e
Author: Stanislav Motylkov <x86corez(a)gmail.com>
AuthorDate: Thu Nov 3 00:24:16 2022 +0300
Commit: Stanislav Motylkov <x86corez(a)gmail.com>
CommitDate: Thu Nov 3 00:24:16 2022 +0300
[REGEDIT] Use MessageBoxW instead of outputting to console
Our regedit is a Win32 GUI application, so do it properly.
Also fix STRING_USAGE linebreak sync problem.
Addendum to 36a7f0dc.
---
base/applications/regedit/lang/bg-BG.rc | 2 +-
base/applications/regedit/lang/cs-CZ.rc | 2 +-
base/applications/regedit/lang/de-DE.rc | 2 +-
base/applications/regedit/lang/el-GR.rc | 2 +-
base/applications/regedit/lang/en-US.rc | 2 +-
base/applications/regedit/lang/es-ES.rc | 2 +-
base/applications/regedit/lang/fr-FR.rc | 2 +-
base/applications/regedit/lang/he-IL.rc | 2 +-
base/applications/regedit/lang/hu-HU.rc | 2 +-
base/applications/regedit/lang/id-ID.rc | 2 +-
base/applications/regedit/lang/it-IT.rc | 2 +-
base/applications/regedit/lang/ja-JP.rc | 2 +-
base/applications/regedit/lang/ko-KR.rc | 2 +-
base/applications/regedit/lang/nl-NL.rc | 2 +-
base/applications/regedit/lang/no-NO.rc | 2 +-
base/applications/regedit/lang/pl-PL.rc | 2 +-
base/applications/regedit/lang/pt-BR.rc | 2 +-
base/applications/regedit/lang/pt-PT.rc | 2 +-
base/applications/regedit/lang/ro-RO.rc | 2 +-
base/applications/regedit/lang/ru-RU.rc | 2 +-
base/applications/regedit/lang/sk-SK.rc | 2 +-
base/applications/regedit/lang/sl-SI.rc | 2 +-
base/applications/regedit/lang/sq-AL.rc | 2 +-
base/applications/regedit/lang/sv-SE.rc | 2 +-
base/applications/regedit/lang/th-TH.rc | 2 +-
base/applications/regedit/lang/tr-TR.rc | 2 +-
base/applications/regedit/lang/uk-UA.rc | 2 +-
base/applications/regedit/lang/zh-CN.rc | 2 +-
base/applications/regedit/lang/zh-HK.rc | 2 +-
base/applications/regedit/lang/zh-TW.rc | 2 +-
base/applications/regedit/regedit.c | 8 ++++++++
31 files changed, 38 insertions(+), 30 deletions(-)
diff --git a/base/applications/regedit/lang/bg-BG.rc
b/base/applications/regedit/lang/bg-BG.rc
index 47ae89dcc90..854be85902f 100644
--- a/base/applications/regedit/lang/bg-BG.rc
+++ b/base/applications/regedit/lang/bg-BG.rc
@@ -37,7 +37,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/cs-CZ.rc
b/base/applications/regedit/lang/cs-CZ.rc
index 4a45a4762d7..21fe50adac9 100644
--- a/base/applications/regedit/lang/cs-CZ.rc
+++ b/base/applications/regedit/lang/cs-CZ.rc
@@ -32,7 +32,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/de-DE.rc
b/base/applications/regedit/lang/de-DE.rc
index 052d952c2ed..14051258156 100644
--- a/base/applications/regedit/lang/de-DE.rc
+++ b/base/applications/regedit/lang/de-DE.rc
@@ -32,7 +32,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/el-GR.rc
b/base/applications/regedit/lang/el-GR.rc
index 618cf5180e1..5f016432c54 100644
--- a/base/applications/regedit/lang/el-GR.rc
+++ b/base/applications/regedit/lang/el-GR.rc
@@ -32,7 +32,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/en-US.rc
b/base/applications/regedit/lang/en-US.rc
index e6d28237a92..76c3635f8dc 100644
--- a/base/applications/regedit/lang/en-US.rc
+++ b/base/applications/regedit/lang/en-US.rc
@@ -32,7 +32,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/es-ES.rc
b/base/applications/regedit/lang/es-ES.rc
index d774fa5304f..e1ea9f54910 100644
--- a/base/applications/regedit/lang/es-ES.rc
+++ b/base/applications/regedit/lang/es-ES.rc
@@ -35,7 +35,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/fr-FR.rc
b/base/applications/regedit/lang/fr-FR.rc
index 80a5ee55008..9be278812e8 100644
--- a/base/applications/regedit/lang/fr-FR.rc
+++ b/base/applications/regedit/lang/fr-FR.rc
@@ -32,7 +32,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/he-IL.rc
b/base/applications/regedit/lang/he-IL.rc
index 910954e4729..2ed77b68c4b 100644
--- a/base/applications/regedit/lang/he-IL.rc
+++ b/base/applications/regedit/lang/he-IL.rc
@@ -32,7 +32,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/hu-HU.rc
b/base/applications/regedit/lang/hu-HU.rc
index 385cfa04023..cf34fd50515 100644
--- a/base/applications/regedit/lang/hu-HU.rc
+++ b/base/applications/regedit/lang/hu-HU.rc
@@ -32,7 +32,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/id-ID.rc
b/base/applications/regedit/lang/id-ID.rc
index 72cd30c1912..0a05d82ff06 100644
--- a/base/applications/regedit/lang/id-ID.rc
+++ b/base/applications/regedit/lang/id-ID.rc
@@ -32,7 +32,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/it-IT.rc
b/base/applications/regedit/lang/it-IT.rc
index 041dd1390f9..6657986753a 100644
--- a/base/applications/regedit/lang/it-IT.rc
+++ b/base/applications/regedit/lang/it-IT.rc
@@ -32,7 +32,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/ja-JP.rc
b/base/applications/regedit/lang/ja-JP.rc
index a525fffa46a..b850ffc5c9a 100644
--- a/base/applications/regedit/lang/ja-JP.rc
+++ b/base/applications/regedit/lang/ja-JP.rc
@@ -32,7 +32,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/ko-KR.rc
b/base/applications/regedit/lang/ko-KR.rc
index 1d9f49aa14e..0d75c938bb4 100644
--- a/base/applications/regedit/lang/ko-KR.rc
+++ b/base/applications/regedit/lang/ko-KR.rc
@@ -34,7 +34,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/nl-NL.rc
b/base/applications/regedit/lang/nl-NL.rc
index 5063bb270e9..21897461b84 100644
--- a/base/applications/regedit/lang/nl-NL.rc
+++ b/base/applications/regedit/lang/nl-NL.rc
@@ -32,7 +32,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/no-NO.rc
b/base/applications/regedit/lang/no-NO.rc
index 86d803983ce..1c2d08a00ce 100644
--- a/base/applications/regedit/lang/no-NO.rc
+++ b/base/applications/regedit/lang/no-NO.rc
@@ -32,7 +32,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/pl-PL.rc
b/base/applications/regedit/lang/pl-PL.rc
index 8887f936757..fc42f95ebcb 100644
--- a/base/applications/regedit/lang/pl-PL.rc
+++ b/base/applications/regedit/lang/pl-PL.rc
@@ -42,7 +42,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/pt-BR.rc
b/base/applications/regedit/lang/pt-BR.rc
index 62aacc40cfa..4c91129d37f 100644
--- a/base/applications/regedit/lang/pt-BR.rc
+++ b/base/applications/regedit/lang/pt-BR.rc
@@ -32,7 +32,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/pt-PT.rc
b/base/applications/regedit/lang/pt-PT.rc
index 5c3a28fb6dd..61d5e3f0994 100644
--- a/base/applications/regedit/lang/pt-PT.rc
+++ b/base/applications/regedit/lang/pt-PT.rc
@@ -32,7 +32,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/ro-RO.rc
b/base/applications/regedit/lang/ro-RO.rc
index 26c80368317..4cbdb719259 100644
--- a/base/applications/regedit/lang/ro-RO.rc
+++ b/base/applications/regedit/lang/ro-RO.rc
@@ -34,7 +34,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/ru-RU.rc
b/base/applications/regedit/lang/ru-RU.rc
index f93be6f0bc8..97489d19d6d 100644
--- a/base/applications/regedit/lang/ru-RU.rc
+++ b/base/applications/regedit/lang/ru-RU.rc
@@ -32,7 +32,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/sk-SK.rc
b/base/applications/regedit/lang/sk-SK.rc
index b9be14f8f64..3b5602125f6 100644
--- a/base/applications/regedit/lang/sk-SK.rc
+++ b/base/applications/regedit/lang/sk-SK.rc
@@ -37,7 +37,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/sl-SI.rc
b/base/applications/regedit/lang/sl-SI.rc
index bea070d2363..d519d24b590 100644
--- a/base/applications/regedit/lang/sl-SI.rc
+++ b/base/applications/regedit/lang/sl-SI.rc
@@ -32,7 +32,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/sq-AL.rc
b/base/applications/regedit/lang/sq-AL.rc
index 1595547cb8c..d6192aae15f 100644
--- a/base/applications/regedit/lang/sq-AL.rc
+++ b/base/applications/regedit/lang/sq-AL.rc
@@ -36,7 +36,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/sv-SE.rc
b/base/applications/regedit/lang/sv-SE.rc
index 33a26b7966a..315cf46c7b9 100644
--- a/base/applications/regedit/lang/sv-SE.rc
+++ b/base/applications/regedit/lang/sv-SE.rc
@@ -32,7 +32,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/th-TH.rc
b/base/applications/regedit/lang/th-TH.rc
index f46ae623359..0f1c3815171 100644
--- a/base/applications/regedit/lang/th-TH.rc
+++ b/base/applications/regedit/lang/th-TH.rc
@@ -34,7 +34,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/tr-TR.rc
b/base/applications/regedit/lang/tr-TR.rc
index d0eeb3bba27..7f2a968d327 100644
--- a/base/applications/regedit/lang/tr-TR.rc
+++ b/base/applications/regedit/lang/tr-TR.rc
@@ -34,7 +34,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/uk-UA.rc
b/base/applications/regedit/lang/uk-UA.rc
index d42e2b3dc33..15a3b1ceb32 100644
--- a/base/applications/regedit/lang/uk-UA.rc
+++ b/base/applications/regedit/lang/uk-UA.rc
@@ -34,7 +34,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/zh-CN.rc
b/base/applications/regedit/lang/zh-CN.rc
index 56b46151044..6380d8a413b 100644
--- a/base/applications/regedit/lang/zh-CN.rc
+++ b/base/applications/regedit/lang/zh-CN.rc
@@ -42,7 +42,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/zh-HK.rc
b/base/applications/regedit/lang/zh-HK.rc
index cc73b0721a7..5f75641857f 100644
--- a/base/applications/regedit/lang/zh-HK.rc
+++ b/base/applications/regedit/lang/zh-HK.rc
@@ -40,7 +40,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/lang/zh-TW.rc
b/base/applications/regedit/lang/zh-TW.rc
index 2fa19df56bc..8dff53ad18a 100644
--- a/base/applications/regedit/lang/zh-TW.rc
+++ b/base/applications/regedit/lang/zh-TW.rc
@@ -41,7 +41,7 @@ Options:\n\
be imported. When used with [/E], this option specifies the\n\
file location where registry information will be exported.\n\
[reg_key] The registry key to be modified.\n\
-n\
+\n\
Usage examples:\n\
regedit ""import.reg""\n\
regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
diff --git a/base/applications/regedit/regedit.c b/base/applications/regedit/regedit.c
index 44243c4e219..573a6341433 100644
--- a/base/applications/regedit/regedit.c
+++ b/base/applications/regedit/regedit.c
@@ -34,6 +34,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(regedit);
static void output_writeconsole(const WCHAR *str, DWORD wlen)
{
+#ifdef __REACTOS__
+ /* This is win32gui application, don't ever try writing to console.
+ * For the console version we have a separate reg.exe application. */
+ WCHAR AppStr[255];
+ LoadStringW(hInst, IDS_APP_TITLE, AppStr, ARRAY_SIZE(AppStr));
+ MessageBoxW(NULL, str, AppStr, MB_OK | MB_ICONINFORMATION);
+#else
DWORD count;
if (!WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), str, wlen, &count, NULL))
@@ -52,6 +59,7 @@ static void output_writeconsole(const WCHAR *str, DWORD wlen)
WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), msgA, len, &count, FALSE);
free(msgA);
}
+#endif
}
static void output_formatstring(const WCHAR *fmt, va_list va_args)