This is probably very trivial, but i could not find the answer in the docs
How to intercept close event of the main window ? Basically i want to show a confirmation dialog before my app is closed, if the user confirm then proceed, if not then do nothing
How to intercept close event Topic is solved
look at wxCloseEvent.
If you use event table :
If you use event table :
Code: Select all
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_CLOSE(MyFrame::OnFrameClose)
END_EVENT_TABLE()
void MyFrame::OnFrameClose(wxCloseEvent& event)
{
Destroy();
}
Jérémie