mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[MSI] Fix dialog.c showing two taskbar panes on Cancel (#3861)
Only show the main dialog pane on taskbar when executing a Cancel dialog. Assign previous window handle as a parent when creating Cancel dialog box. CORE-17702
This commit is contained in:
parent
236649c626
commit
81358d08f0
1 changed files with 18 additions and 0 deletions
|
@ -171,6 +171,10 @@ static const WCHAR szHyperLink[] = {'H','y','p','e','r','L','i','n','k',0};
|
|||
static DWORD uiThreadId;
|
||||
static HWND hMsiHiddenWindow;
|
||||
|
||||
#ifdef __REACTOS__
|
||||
static HANDLE hPrevious = NULL;
|
||||
#endif
|
||||
|
||||
static LPWSTR msi_get_window_text( HWND hwnd )
|
||||
{
|
||||
UINT sz, r;
|
||||
|
@ -3819,6 +3823,9 @@ static LRESULT WINAPI MSIDialog_WndProc( HWND hwnd, UINT msg,
|
|||
|
||||
case WM_DESTROY:
|
||||
dialog->hwnd = NULL;
|
||||
#ifdef __REACTOS__
|
||||
hPrevious = NULL;
|
||||
#endif
|
||||
return 0;
|
||||
case WM_NOTIFY:
|
||||
return msi_dialog_onnotify( dialog, lParam );
|
||||
|
@ -3854,15 +3861,26 @@ static UINT dialog_run_message_loop( msi_dialog *dialog )
|
|||
if (dialog->parent == NULL && (dialog->attributes & msidbDialogAttributesMinimize))
|
||||
style |= WS_MINIMIZEBOX;
|
||||
|
||||
#ifdef __REACTOS__
|
||||
hwnd = CreateWindowW( szMsiDialogClass, dialog->name, style,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
hPrevious, NULL, NULL, dialog );
|
||||
#else
|
||||
hwnd = CreateWindowW( szMsiDialogClass, dialog->name, style,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
NULL, NULL, NULL, dialog );
|
||||
#endif
|
||||
|
||||
if( !hwnd )
|
||||
{
|
||||
ERR("Failed to create dialog %s\n", debugstr_w( dialog->name ));
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
}
|
||||
|
||||
#ifdef __REACTOS__
|
||||
hPrevious = hwnd;
|
||||
#endif
|
||||
|
||||
ShowWindow( hwnd, SW_SHOW );
|
||||
/* UpdateWindow( hwnd ); - and causes the transparent static controls not to paint */
|
||||
|
||||
|
|
Loading…
Reference in a new issue