Merge DIALOG_RESULT_YES and DIALOG_RESULT_OK into a single DIALOG_RESULT_YES_OK constant
Add canceled event to dialog box, Fix a potential segfault