From cb8ef7d2bb944803d92aaef8786161700eb41b83 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Sun, 31 Jan 1999 15:02:23 +0000 Subject: [PATCH] Dialog window should not be destroyed in DefDlgProc; this break modeless dialogs. --- include/dialog.h | 1 - windows/defdlg.c | 18 ------------------ windows/dialog.c | 1 - 3 files changed, 20 deletions(-) diff --git a/include/dialog.h b/include/dialog.h index f340070830e..ac3a14d30b1 100644 --- a/include/dialog.h +++ b/include/dialog.h @@ -38,7 +38,6 @@ typedef struct #pragma pack(4) #define DF_END 0x0001 -#define DF_ENDING 0x0002 extern BOOL32 DIALOG_Init(void); extern HWND32 DIALOG_CreateIndirect( HINSTANCE32 hInst, LPCSTR dlgTemplate, diff --git a/windows/defdlg.c b/windows/defdlg.c index 7e1fdf576d4..01fb79f5c3a 100644 --- a/windows/defdlg.c +++ b/windows/defdlg.c @@ -266,12 +266,6 @@ LRESULT WINAPI DefDlgProc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam, /* 16 bit dlg procs only return BOOL16 */ if( WINPROC_GetProcType( dlgInfo->dlgProc ) == WIN_PROC_16 ) result = LOWORD(result); - - /* Check if window was destroyed by dialog procedure */ - if (dlgInfo->flags & DF_END && !(dlgInfo->flags & DF_ENDING)) { - dlgInfo->flags |= DF_ENDING; - DestroyWindow32( hwnd ); - } } if (!result && IsWindow32(hwnd)) @@ -329,12 +323,6 @@ LRESULT WINAPI DefDlgProc32A( HWND32 hwnd, UINT32 msg, /* 16 bit dlg procs only return BOOL16 */ if( WINPROC_GetProcType( dlgInfo->dlgProc ) == WIN_PROC_16 ) result = LOWORD(result); - - /* Check if window was destroyed by dialog procedure */ - if (dlgInfo->flags & DF_END && !(dlgInfo->flags & DF_ENDING)) { - dlgInfo->flags |= DF_ENDING; - DestroyWindow32( hwnd ); - } } if (!result && IsWindow32(hwnd)) @@ -392,12 +380,6 @@ LRESULT WINAPI DefDlgProc32W( HWND32 hwnd, UINT32 msg, WPARAM32 wParam, /* 16 bit dlg procs only return BOOL16 */ if( WINPROC_GetProcType( dlgInfo->dlgProc ) == WIN_PROC_16 ) result = LOWORD(result); - - /* Check if window was destroyed by dialog procedure */ - if (dlgInfo->flags & DF_END && !(dlgInfo->flags & DF_ENDING)) { - dlgInfo->flags |= DF_ENDING; - DestroyWindow32( hwnd ); - } } if (!result && IsWindow32(hwnd)) diff --git a/windows/dialog.c b/windows/dialog.c index afc4fa8f5b9..e1a31e13792 100644 --- a/windows/dialog.c +++ b/windows/dialog.c @@ -869,7 +869,6 @@ INT32 DIALOG_DoDialogBox( HWND32 hwnd, HWND32 owner ) } retval = dlgInfo->idResult; EnableWindow32( owner, TRUE ); - dlgInfo->flags |= DF_ENDING; /* try to stop it being destroyed twice */ DestroyWindow32( hwnd ); return retval; } -- 2.11.4.GIT