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:
parent
3143f67bb6
commit
1ffe652cd1
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue