Closing a dialog box with the "X" box?
-
Hi, I am trying to close a dialog box that I created using CreateDialog(). The dialog appears and all the buttons work well, however, if I attempt to close the dialog using the "x" box on the system menu, nothing happens. I understand that usually the "x" box sends either the IDCANCEL or the WM_CLOSE message when depressed, but that doesnt' seem to be happening. Any ideas? Thank you, Joe
-
Hi, I am trying to close a dialog box that I created using CreateDialog(). The dialog appears and all the buttons work well, however, if I attempt to close the dialog using the "x" box on the system menu, nothing happens. I understand that usually the "x" box sends either the IDCANCEL or the WM_CLOSE message when depressed, but that doesnt' seem to be happening. Any ideas? Thank you, Joe
in WM_NCLBUTTONDOW, if hit-test is HTCLOSE, close the dialog by OnCancel() etc.