mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
[REGEDIT]
- Allow canceling import operations. Patch by Lee Schroeder. CORE-6766 #resolve svn path=/trunk/; revision=57773
This commit is contained in:
parent
5c4631ef0b
commit
f8de4142cd
2 changed files with 18 additions and 3 deletions
|
@ -213,7 +213,7 @@ int APIENTRY wWinMain(HINSTANCE hInstance,
|
|||
/* Perform application initialization */
|
||||
if (!InitInstance(hInstance, nCmdShow))
|
||||
{
|
||||
return FALSE;
|
||||
return 0;
|
||||
}
|
||||
hAccel = LoadAcceleratorsW(hInstance, MAKEINTRESOURCEW(ID_ACCEL));
|
||||
|
||||
|
|
|
@ -158,10 +158,25 @@ BOOL PerformRegAction(REGEDIT_ACTION action, LPWSTR s, BOOL silent)
|
|||
/* Request import confirmation */
|
||||
if (!silent)
|
||||
{
|
||||
int choice;
|
||||
|
||||
LoadStringW(hInst, IDS_IMPORT_PROMPT, szText, COUNT_OF(szText));
|
||||
|
||||
if (InfoMessageBox(NULL, MB_YESNO | MB_ICONWARNING, szTitle, szText, filename) != IDYES)
|
||||
goto cont;
|
||||
choice = InfoMessageBox(NULL, MB_YESNOCANCEL | MB_ICONWARNING, szTitle, szText, filename);
|
||||
|
||||
switch (choice)
|
||||
{
|
||||
case IDNO:
|
||||
goto cont;
|
||||
case IDCANCEL:
|
||||
/* The cancel case is useful if the user is importing more than one registry file
|
||||
at a time, and wants to back out anytime during the import process. This way, the
|
||||
user doesn't have to resort to ending the regedit process abruptly just to cancel
|
||||
the operation. */
|
||||
return TRUE;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Open the file */
|
||||
|
|
Loading…
Reference in a new issue