Closing a dialog using the menu bar ("x" or "-" button or windows

menu) must generate a WM_COMMAND+IDCANCEL message, unlike closing
normal windows when DestroyWindow() is called.
This commit is contained in:
Rein Klazes 1998-10-15 13:00:38 +00:00 committed by Alexandre Julliard
parent 3143f67bb6
commit 1ffe652cd1
1 changed files with 2 additions and 2 deletions

View File

@ -223,8 +223,8 @@ static LRESULT DEFDLG_Proc( HWND32 hwnd, UINT32 msg, WPARAM32 wParam,
return dlgInfo->hUserFont;
case WM_CLOSE:
EndDialog32( hwnd, TRUE );
DestroyWindow32( hwnd );
PostMessage32A( hwnd, WM_COMMAND, IDCANCEL,
(LPARAM)GetDlgItem32( hwnd, IDCANCEL ) );
return 0;
}
return 0;