mirror of
https://github.com/reactos/reactos.git
synced 2025-07-03 09:01:24 +00:00
[APPWIZ] Show message box upon error
This commit is contained in:
parent
4ed6b1ffca
commit
c5f89b8159
1 changed files with 7 additions and 4 deletions
|
@ -407,11 +407,13 @@ ShowCreateShortcutWizard(HWND hwndCPl, LPWSTR szPath)
|
||||||
UINT nPages = 0;
|
UINT nPages = 0;
|
||||||
UINT nLength;
|
UINT nLength;
|
||||||
DWORD attrs;
|
DWORD attrs;
|
||||||
|
PCREATE_LINK_CONTEXT pContext;
|
||||||
|
|
||||||
PCREATE_LINK_CONTEXT pContext = (PCREATE_LINK_CONTEXT) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CREATE_LINK_CONTEXT));
|
pContext = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*pContext));
|
||||||
if (!pContext)
|
if (!pContext)
|
||||||
{
|
{
|
||||||
/* no memory */
|
/* no memory */
|
||||||
|
MessageBoxA(hwndCPl, "Out of memory!", NULL, MB_ICONERROR);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -421,6 +423,7 @@ ShowCreateShortcutWizard(HWND hwndCPl, LPWSTR szPath)
|
||||||
HeapFree(GetProcessHeap(), 0, pContext);
|
HeapFree(GetProcessHeap(), 0, pContext);
|
||||||
|
|
||||||
/* no directory given */
|
/* no directory given */
|
||||||
|
MessageBoxA(hwndCPl, "No directory given!", NULL, MB_ICONERROR);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -430,6 +433,7 @@ ShowCreateShortcutWizard(HWND hwndCPl, LPWSTR szPath)
|
||||||
HeapFree(GetProcessHeap(), 0, pContext);
|
HeapFree(GetProcessHeap(), 0, pContext);
|
||||||
|
|
||||||
/* invalid path */
|
/* invalid path */
|
||||||
|
MessageBoxA(hwndCPl, "Invalid path!", NULL, MB_ICONERROR);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -461,7 +465,6 @@ ShowCreateShortcutWizard(HWND hwndCPl, LPWSTR szPath)
|
||||||
psp.pszTemplate = MAKEINTRESOURCEW(IDD_SHORTCUT_FINISH);
|
psp.pszTemplate = MAKEINTRESOURCEW(IDD_SHORTCUT_FINISH);
|
||||||
ahpsp[nPages++] = CreatePropertySheetPage(&psp);
|
ahpsp[nPages++] = CreatePropertySheetPage(&psp);
|
||||||
|
|
||||||
|
|
||||||
/* Create the property sheet */
|
/* Create the property sheet */
|
||||||
psh.dwSize = sizeof(PROPSHEETHEADER);
|
psh.dwSize = sizeof(PROPSHEETHEADER);
|
||||||
psh.dwFlags = PSH_WIZARD97 | PSH_WATERMARK | PSH_USEICONID | PSH_USECALLBACK;
|
psh.dwFlags = PSH_WIZARD97 | PSH_WATERMARK | PSH_USEICONID | PSH_USECALLBACK;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue