I am trying to prevent the application from closing by clicking the "Close" button in the application window. For example, having a text editor with unsaved changes, after clicking the "Close" button, I must first display "Do you want to save the changes before exiting?"
How can I detect an application that wants to close and prevent this?
I am using C ++ and this should be for Windows 10 Universal Apps UWP. I already know how to do this for Win32. Thanks
source share