So far I have written some simple code for a wxWidgets application, like creating a menu, frame and a few buttons. To follow the process of exiting, I have this function that shows a message box :
int OnExit( )
{
wxMessageBox( "Closing the application", wxOK | wxICON_INFORMATION )
return 0;
}
Closing the application by clicking close ( X ) button shows the message box and then exits. But closing it by clicking the "Quit" menu item doesn't work for me. I have tried copying some code from an old example and from CodeBlocks basic sample code that comes with wxWidgets project, with no luck. Please show me a method of closing the application from the menu item.