I have a Python WxWidgets program, and have a "File->Quit" menu option that calls a quit function that cleanly shuts down my application. However, the application can also be closed by pressing the 'X' in the top right of the window. I would like to add a hook to capture that window close event to do my clean shutdown. How do I do that?
My main window is created with these options:
wx.Frame.__init__(self, parent, title=title, style=wx.DEFAULT_FRAME_STYLE ^ wx.RESIZE_BORDER)