When calling:
AfxMessageBox(strMsg, MB_YESNO);
A messagebox with the buttons "Yes" and "No" is displayed. But the "X" (close button) in the upper right corner is disabled, and pressing ESC has no effect.
This is because the only valid results would be IDYES and IDNO, and not IDCANCEL.
Is there a quick way of getting this behavior enabled? What I would like to avoid:
- Creating a custom dialog for this.
- Having yes/no/cancel buttons.
In vista, when deleting a file, the dialog asking for confirmation has only "Yes" and "No" and can also be canceled with the close button or with ESC. I'm guessing it's a custom dialog.