Add a menu item to the dialogs sample for simulating having unsaved documents in the application. Then demonstrate how to do something when the user attempts to close the application, e.g. show a dialog, and possibly cancel closing. This code was originally written for debugging some issue related to closing an application, but besides that it serves as an example of a very common pattern a lot of real world applications need in some form. Mention the example in samples/dialogs in wxCloseEvent documentation
133 KiB
133 KiB