[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.
This commit is contained in:
Stanislav Motylkov 2022-11-03 00:24:16 +03:00
parent 683d81b7db
commit ed7b0d0bd9
No known key found for this signature in database
GPG key ID: AFE513258CBA9E92
31 changed files with 38 additions and 30 deletions

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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\

View file

@ -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)