Is there a message that I can handle in a dialog box that gets called regardless of how the dialog is closed? I need to save changed data whether the user clicks OnOK, OnCancel, or the menu "X" button or presses the ESC key.

Thanks